diff --git a/Gemfile.lock b/Gemfile.lock
index dafce496b2e7d4c1660fb44d27ff9bf342dc7938..b6cfa561f1d092fa1535fe28bf07380a83d8aa8e 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -12,18 +12,18 @@ PATH
 GEM
   remote: https://rubygems.org/
   specs:
-    aruba (0.14.6)
-      childprocess (>= 0.6.3, < 0.10.0)
+    aruba (0.14.8)
+      childprocess (>= 0.6.3, < 1.1.0)
       contracts (~> 0.9)
       cucumber (>= 1.3.19)
-      ffi (~> 1.9.10)
+      ffi (~> 1.9)
       rspec-expectations (>= 2.99)
       thor (~> 0.19)
     backports (3.11.4)
     builder (3.2.3)
-    childprocess (0.9.0)
-      ffi (~> 1.0, >= 1.0.11)
-    concurrent-ruby (1.0.5)
+    childprocess (1.0.1)
+      rake (< 13.0)
+    concurrent-ruby (1.1.4)
     contracts (0.16.0)
     cucumber (3.1.2)
       builder (>= 2.1.2)
@@ -34,16 +34,16 @@ GEM
       gherkin (~> 5.1.0)
       multi_json (>= 1.7.5, < 2.0)
       multi_test (>= 0.1.2)
-    cucumber-core (3.2.0)
+    cucumber-core (3.2.1)
       backports (>= 3.8.0)
       cucumber-tag_expressions (~> 1.1.0)
-      gherkin (>= 5.0.0)
+      gherkin (~> 5.0)
     cucumber-expressions (6.0.1)
     cucumber-tag_expressions (1.1.1)
     cucumber-wire (0.0.1)
     diff-lcs (1.3)
     eventmachine (1.2.7)
-    ffi (1.9.25)
+    ffi (1.10.0)
     gherkin (5.1.0)
     json (1.8.6)
     methadone (1.9.5)
@@ -54,11 +54,11 @@ GEM
     rake (11.3.0)
     rdoc (4.3.0)
     require_all (2.0.0)
-    rspec-expectations (3.8.1)
+    rspec-expectations (3.8.2)
       diff-lcs (>= 1.2.0, < 2.0)
       rspec-support (~> 3.8.0)
     rspec-support (3.8.0)
-    thor (0.20.0)
+    thor (0.20.3)
     wisper (2.0.0)
 
 PLATFORMS
@@ -67,10 +67,10 @@ PLATFORMS
 DEPENDENCIES
   aethyr!
   aruba (~> 0.14)
-  bundler (~> 1.7)
+  bundler (~> 2.0)
   json (~> 1.8)
   rake (~> 11.3)
   rdoc (~> 4.2)
 
 BUNDLED WITH
-   1.16.1
+   2.0.1
diff --git a/aethyr.gemspec b/aethyr.gemspec
index e57988d9dc368fbc594e24ada1c4a079458b8a7b..2deda025e326729156d3284e99e02960a641f60e 100644
--- a/aethyr.gemspec
+++ b/aethyr.gemspec
@@ -33,9 +33,9 @@ Gem::Specification.new do |spec|
   spec.add_dependency 'methadone', '~> 1.9'
   spec.add_dependency 'eventmachine', '~> 1.2'
   spec.add_dependency 'require_all', '~> 2.0'
-  spec.add_dependency 'concurrent-ruby', '~> 1.0'  
-  spec.add_dependency 'ncursesw', '~> 1.4' 
-  spec.add_development_dependency 'bundler', '~> 1.7'
+  spec.add_dependency 'concurrent-ruby', '~> 1.0'
+  spec.add_dependency 'ncursesw', '~> 1.4'
+  spec.add_development_dependency 'bundler', '~> 2.0'
   spec.add_development_dependency 'json', '~> 1.8'
   spec.add_development_dependency 'rake', '~> 11.3'
   spec.add_development_dependency 'rdoc', '~> 4.2'
diff --git a/bin/aethyr_setup b/bin/aethyr_setup
index c15545333a67cda8e7f52de5fd8e5c292b00455f..45871a74b30f80fe7169d89bfd3d9fd9898a7a4b 100755
--- a/bin/aethyr_setup
+++ b/bin/aethyr_setup
@@ -106,7 +106,7 @@ def reset_storage
   puts "Recreating initial objects..."
 
   $manager = Manager.new
-  
+
   city_area = $manager.create_object(Area, nil, nil, nil, :@name => "City of Ófærr")
   city_area.add_flag PlusEarth.new(city_area)
   city_area.info.terrain.type =  Terrain::CITY
@@ -115,7 +115,7 @@ def reset_storage
   church_entrance_room = $manager.create_object(Room, city_area, [-1,0], nil, :@name => "Church of Light Entrance", :@short_desc => "Before you stands an ancient disregarded church. It is too dark to see inside however from the look of the collapsed roof and rotting wood door way it probably isnt safe to enter.")
   $manager.create_object(Exit, town_square_room, nil, church_entrance_room.goid, :@alt_names => ["west"])
   $manager.create_object(Exit, church_entrance_room, nil, town_square_room.goid, :@alt_names => ["east"])
-  
+
   area = $manager.create_object(Area, nil, nil, nil, :@name => "an Underground Cavern")
   area.info.terrain.type =  Terrain::UNDERGROUND
   area.add_flag MinusFire.new(area)
@@ -126,7 +126,7 @@ def reset_storage
   $manager.create_object(Exit, church_entrance_room, nil, hole.goid, :@alt_names => ["church"])
   slime = $manager.create_object(Mobile, hole, nil, nil, :@generic => "blue slime", :@short_desc => "A <mob>blue slime</mob> stands here being useless", :@alt_names => ["slime"])
 
-  
+
   man = $manager.create_object(Mobile, hole, nil, nil, :@generic => "tall man", :@short_desc => "A <mob>tall man</mob> with a <raw fg:orange_4>v<raw fg:red>e</raw fg:red>ry</raw fg:orange_4> long beard stands here placidly.", :@alt_names => ["man"], :@show_in_look => "A <mob>tall man</mob> with a <raw fg:orange_4>v<raw fg:red>e</raw fg:red>ry</raw fg:orange_4> long beard stands here regarding you placidly.", :@sex => "m")
 
   puts "Adding helper reactions..."
@@ -504,4 +504,3 @@ HERE
 end
 
 setup_menu
-
diff --git a/intro.txt b/intro.txt
index df9372306f4625003534a07a5e8339e3c7e4ef92..d05c9d1bdbfe0467f986acd55e6eb4be5df6fb18 100644
--- a/intro.txt
+++ b/intro.txt
@@ -1,44 +1,59 @@
-                        /\
-                        ||
-                        ||
-                        ||
-                        ||                                               ~-----~
-                        ||                                            /===--  --
-                        ||                   ;'                 /==~- --   -    
-                        ||                (/ ('              /=----         ~~_ 
-                        ||             ' / ;'             /=----               \
-     '                ~==_=~          '('             ~-~~      ~~~~        ~~~-
-     \\                (c_\_        .i.             /~--    ~~~--   -~     (
-      `\               (}| /       / : \           / ~~------~     ~~\   (
-      \ '               ||/ \      |===|          /~/             ~~~ \ \(
-      ``~\              ~~\  )~.~_ >._.< _~-~     |`_          ~~-~     )\
-       '-~                 {  /  ) \___/ (   \   |` ` _       ~~         '
-       \ -~\                -<__/  -   -  L~ -;   \\    \ _ _/
-       `` ~~=\                  {    :    }\ ,\    ||   _ :(
-        \  ~~=\__                \ _/ \_ /  )  } _//   ( `|'
-        ``    , ~\--~=\           \     /  / _/ / '    (   '
-         \`    } ~ ~~ -~=\   _~_  / \ / \ )^ ( // :_  / '
-         |    ,          _~-'   '~~__-_  / - |/     \ (
-          \  ,_--_     _/              \_'---', -~ .   \
-           )/      /\ / /\   ,~,         \__ _}     \_  "~_
-           ,      { ( _ )'} ~ - \_    ~\  (-:-)       "\   ~ 
-                  /'' ''  )~ \~_ ~\   )->  \ :|    _,       " 
-                 (\  _/)''} | \~_ ~  /~(   | :)   /          }
-                <``  >;,,/  )= \~__ {{{ '  \ =(  ,   ,       ;
-               {o_o }_/     |v  '~__  _    )-v|  "  :       ,"
-               {/"\_)       {_/'  \~__ ~\_ \\_} '  {        /~\
-               ,/!          '_/    '~__ _-~ \_' :  '      ,"  ~ 
-              (''`                  /,'~___~    | /     ,"  \ ~' 
-             '/, )                 (-)  '~____~";     ,"     , }
-           /,')                    / \         /  ,~-"       '~'
-       (  ''/                     / ( '       /  /          '~'
-    ~ ~  ,, /) ,                 (/( \)      ( -)          /~'
-  (  ~~ )`  ~}                   '  \)'     _/ /           ~'
- { |) /`,--.(  }'                    '     (  /          /~'
-(` ~ ( c|~~| `}   )                        '/:\         ,'
- ~ )/``) )) '|),                          (/ | \)                 -sjm
-  (` (-~(( `~`'  )                        ' (/ '
-   `~'    )'`')                              '
-     ` ``
-     
-                         Welcome to the Aethyr
\ No newline at end of file
+                        <earthhigh>/\</earthhigh>
+                        <earthhigh>||</earthhigh>
+                        <earthhigh>||</earthhigh>
+                        <earthhigh>||</earthhigh>
+                        <earthhigh>||</earthhigh>                                               <water>~-----~</water>
+                        <earthhigh>||</earthhigh>                                            <water>/===--  --</water>
+                        <earthhigh>||</earthhigh>                   <identifier>;'</identifier>                 <water>/==~- --   -</water>
+                        <earthhigh>||</earthhigh>                <identifier>(/ ('</identifier>              <water>/=----         ~~_</water>
+                        <earthhigh>||</earthhigh>             <identifier>' / ;'</identifier>             <water>/=----               \</water>
+     <water>'                <airlow>~==_=~</airlow>          <identifier>'('</identifier>             ~-~~      ~~~~        ~~~-</water>
+     <water>\\                <regular>(c<airlow>_</airlow>\_        .i.</regular>             /~--    ~~~--   -~     (</water>
+      <water>`\               <regular>(}<airlow>|</airlow> /       / : \</regular>           / ~~------~     ~~\   (</water>
+      <water>\ '               <regular><airlow>||</airlow>/ \      |<mob>===</mob>|</regular>          /~/             ~~~ \ \(</water>
+      <water>``~\              <regular><airlow>~~</airlow>\  )~.~_ \._./ _~-~</regular>     |`_          ~~-~     )\</water>
+       <water>'-~                 <regular>{  /  ) \___/ (   \</regular>   |` ` _       ~~         '</water>
+       <water>\ -~\                <regular>-<__/  -   -  L~ -;</regular>   \\    \ _ _/</water>
+       <water>`` ~~=\                  <regular>{    :    }\ ,\</regular>    ||   _ :(</water>
+        <water>\  ~~=\__                <regular>\ _/ \_ /  )  }</regular> _//   ( `|'</water>
+        <water>``    , ~\--~=\           <regular>\     /  / _/</regular> / '    (   '</water>
+         <water>\`    } ~ ~~ -~=\   _~_  <regular>/ \ / \ )^ (</regular> // :_  / '</water>
+         <water>|    ,          _~-'   '~~__<regular>-_  / - |</regular>/     \ (</water>
+          <water>\  ,_--_     _/              <regular>\_'---',</regular> -~ .   \</water>
+           <water>)/      /\ / /\   ,~,         <regular>\__ _}</regular>     \_  "~_</water>
+           <water>,      { ( _ )'} ~ - \_    ~\  <regular>(-:-)</regular>       "\   ~</water>
+                  <water>/'' ''  )~ \~_ ~\   )->  <regular>\ :|</regular>    _,       "</water>
+                 <water><roomtitle>(\</roomtitle>  _<roomtitle>/)</roomtitle>''} | \~_ ~  /~(   <regular>| :)</regular>   /          }</water>
+                <water>/``  /;,,/  )= \~__ {{{ '  <regular>\ =(</regular>  ,   ,       ;</water>
+               <water>{<roomtitle>o</roomtitle>_<roomtitle>o</roomtitle> }_/     |v  '~__  _    <regular>)-v|</regular>  "  :       ,"</water>
+               <water>{/"\_)       {_/'  \~__ ~\_ <regular>\\_}</regular> '  {        /~\</water>
+               <important>,/!</important>          <water>'_/    '~__ _-~ <regular>\_'</regular> :  '      ,"  ~</water>
+              <important>(''`</important>                  <water>/,'~___~    | /     ,"  \ ~'</water>
+             <important>'/, )</important>                 <water>(-)  '~____~";     ,"     , }</water>
+           <important>/,')</important>                    <water>/ \         /  ,~-"       '~'</water>
+       <important>(  ''/</important>                     <water>/ ( '       /  /          '~'</water>
+    <important>~ ~  ,, /) ,</important>                 <water>(/( \)      ( -)          /~'</water>
+  <important>(  ~~ )`  ~}</important>                   <news>'</news>  <water>\)</water><news>'</news>     <water>_/ /           ~'</water>
+ <important>{ |) /`,--.(  }'</important>                    <news>'</news>     <water>(  /          /~'</water>
+<important>(` ~ ( c|~~| `}   )</important>                        <water>'/:\</water>         <news>,</news><water>'</water>
+ <important>~ )/``) )) '|),</important>                          <water>(/ | \)</water>
+  <important>(` (-~(( `~`'  )</important>                        <news>'</news> <water>(/</water> <news>'</news>
+   <important>`~'    )'`')</important>                              <news>'</news>
+     <important>` ``</important>
+
+                              <earthhigh>Welcome to the</earthhigh>
+<earth>     ..                              s</earth>
+<earth>  :**888H: `: .xH""                 :8      .uef^"      ..</earth>
+<earth> X   `8888k XX888                  .88    :d88E        @L             .u    .</earth>
+<earth>'8hx  48888 ?8888         .u      :888ooo `888E       9888i   .dL   .d88B :@8c</earth>
+<earth>'8888 '8888 `8888      ud8888.  -*8888888  888E .z8k  `Y888k:*888. ="8888f8888r</earth>
+<earth> %888>'8888  8888    :888'8888.   8888     888E~?888L   888E  888I   4888>'88"</earth>
+<earth>   "8 '888"  8888    d888 '88%"   8888     888E  888E   888E  888I   4888> '</earth>
+<earth>  .-` X*"    8888    8888.+"      8888     888E  888E   888E  888I   4888></earth>
+<earth>    .xhx.    8888    8888L       .8888Lu=  888E  888E   888E  888I  .d888L .+</earth>
+<earth>  .H88888h.~`8888..  '8888c. .+  ^%888*    888E  888E  x888N>-888'  ^"8888*"</earth>
+<earth> .~  `%88!` '888*~    "88888%      'Y"    m888N= 888`   "88"  888      "Y"</earth>
+<earth>       `"     ""        "YP'               `Y"   888          88F</earth>
+<earth>                                                J88"         98"</earth>
+<earth>                                                @%         ./"</earth>
+<earth>                                              :"          ~`</earth>
diff --git a/lib/aethyr/core/commands/command_parser.rb b/lib/aethyr/core/commands/command_parser.rb
index 3d4a54b8b0919e475c86cae08a7ef5bef3959395..8aad2c6a84043e269aad0f11c9012513a27a4daf 100644
--- a/lib/aethyr/core/commands/command_parser.rb
+++ b/lib/aethyr/core/commands/command_parser.rb
@@ -7,14 +7,6 @@ include Aethyr::Direction
 #CommandParser parses commands into commands for the event handler.
 module CommandParser
 
-  @communication = Set.new([
-  'say',
-  'sayto',
-  'whisper',
-  'tell',
-  'reply'
-  ])
-
   @movement = Set.new([
   'sit',
   'stand',
@@ -174,8 +166,6 @@ module CommandParser
           parse_weapon_combat input
         elsif @martial_combat.include? command
           parse_martial_combat input
-        elsif @communication.include? command
-          parse_communication input
         elsif @news.include? command
           parse_news input
         elsif @mobile.include? command and player.is_a? Mobile
@@ -199,25 +189,6 @@ module CommandParser
 
     private
 
-    def parse_communication(input)
-      e = case input
-          when /^say\s+(\((.*?)\)\s*)?(.*)$/i
-            { :action => :say, :phrase => $3, :pre => $2 }
-          when /^sayto\s+(\w+)\s+(\((.*?)\)\s*)?(.*)$/i
-            { :action => :say, :target => $1, :phrase => $4, :pre => $3 }
-          when /^whisper\s+(\w+)\s+(\((.*?)\)\s*)?(.*)$/i
-            { :action => :whisper, :to => $1, :phrase => $4, :pre => $3 }
-          when /^tell\s+(\w+)\s+(.*)$/i
-            { :action => :tell, :target => $1, :message => $2 }
-          when /^reply\s+(.*)$/i
-            { :action => :reply, :message => $1 }
-          else
-            nil
-          end
-
-      Event.new(:Communication, e) if e
-    end
-
     def parse_emote(input)
       event = Event.new(:Emote)
 
diff --git a/lib/aethyr/core/commands/communication.rb b/lib/aethyr/core/commands/communication.rb
deleted file mode 100644
index 98dd7dd4fcd282da043fa01dc66e10f0a80490f7..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/commands/communication.rb
+++ /dev/null
@@ -1,190 +0,0 @@
-#Communication commands.
-module Communication
-  class << self
-    #Says something to the room or to a specific player.
-    def say(event, player, room)
-      phrase = event[:phrase]
-      target = event[:target] && room.find(event[:target])
-      prefix = event[:pre]
-
-      if prefix
-        prefix << ", "
-      else
-        prefix = ""
-      end
-
-      if phrase.nil?
-        player.output("Huh?")
-        return
-      elsif event[:target] and target.nil?
-        player.output("Say what to whom?")
-        return
-      elsif target and target == player
-        player.output "Talking to yourself again?"
-        return
-      elsif target
-        to_clause = " to #{target.name}"
-        ask_clause = " #{target.name}"
-      else
-        to_clause = ""
-        ask_clause = ""
-      end
-
-      phrase[0,1] = phrase[0,1].capitalize
-      phrase.gsub!(/(\s|^|\W)(i)(\s|$|\W)/) { |match| match.sub('i', 'I') }
-
-      case phrase
-      when /:\)$/
-        rvoice = "smiles and "
-        pvoice = "smile and "
-      when /:\($/
-        rvoice = "frowns and "
-        pvoice = "frown and "
-      when /:D$/
-        rvoice = "laughs as #{player.pronoun} "
-        pvoice = "laugh as you "
-      else
-        rvoice = ""
-        pvoice = ""
-      end
-
-      phrase = phrase.gsub(/\s*(:\)|:\()|:D/, '').strip.gsub(/\s{2,}/, ' ')
-
-      case phrase[-1..-1]
-      when "!"
-        pvoice += "exclaim"
-        rvoice += "exclaims"
-      when "?"
-        pvoice += "ask"
-        rvoice += "asks"
-      when "."
-        pvoice += "say"
-        rvoice += "says"
-      else
-        pvoice += "say"
-        rvoice += "says"
-        ender = "."
-      end
-
-      phrase = "<say>\"#{phrase}#{ender}\"</say>"
-
-      event[:target] = target
-      if target and pvoice == "ask"
-        event[:to_target] = prefix + "#{player.name} #{rvoice} you, #{phrase}"
-        event[:to_player] = prefix + "you #{pvoice} #{target.name}, #{phrase}"
-        event[:to_other] = prefix + "#{player.name} #{rvoice} #{target.name}, #{phrase}"
-        event[:to_blind_target] = "Someone asks, #{phrase}"
-        event[:to_blind_other] = "Someone asks, #{phrase}"
-        event[:to_deaf_target] = "#{player.name} seems to be asking you something."
-        event[:to_deaf_other] = "#{player.name} seems to be asking #{target.name} something."
-      elsif target
-        event[:to_target] = prefix + "#{player.name} #{rvoice} to you, #{phrase}"
-        event[:to_player] = prefix + "you #{pvoice} to #{target.name}, #{phrase}"
-        event[:to_other] = prefix + "#{player.name} #{rvoice} to #{target.name}, #{phrase}"
-        event[:to_blind_target] = "Someone #{rvoice}, #{phrase}"
-        event[:to_blind_other] = "Someone #{rvoice}, #{phrase}"
-        event[:to_deaf_target] = "You see #{player.name} say something to you."
-        event[:to_deaf_other] = "You see #{player.name} say something to #{target.name}."
-      else
-        event[:to_player] = prefix + "you #{pvoice}, #{phrase}"
-        event[:to_other] = prefix + "#{player.name} #{rvoice}, #{phrase}"
-        event[:to_blind_other] = "Someone #{rvoice}, #{phrase}"
-        event[:to_deaf_target] = "You see #{player.name} say something."
-        event[:to_deaf_other] = "You see #{player.name} say something."
-      end
-
-      room.out_event(event)
-    end
-
-    #Whispers to another thing.
-    def whisper(event, player, room)
-      object = room.find(event[:to], Player)
-
-      if object.nil?
-        player.output("To whom are you trying to whisper?")
-        return
-      elsif object == player
-        player.output("Whispering to yourself again?")
-        event[:to_other] = "#{player.name} whispers to #{player.pronoun(:reflexive)}."
-        room.out_event(event, player)
-        return
-      end
-
-      phrase = event[:phrase]
-
-      if phrase.nil?
-        player.ouput "What are you trying to whisper?"
-        return
-      end
-
-      prefix = event[:pre]
-
-      if prefix
-        prefix << ", "
-      else
-        prefix = ""
-      end
-
-      phrase[0,1] = phrase[0,1].capitalize
-
-      last_char = phrase[-1..-1]
-
-      unless ["!", "?", "."].include? last_char
-        ender = "."
-      end
-
-      phrase = ", <say>\"#{phrase}#{ender}\"</say>"
-
-      event[:target] = object
-      event[:to_player] = prefix + "you whisper to #{object.name}#{phrase}"
-      event[:to_target] = prefix + "#{player.name} whispers to you#{phrase}"
-      event[:to_other] = prefix + "#{player.name} whispers quietly into #{object.name}'s ear."
-      event[:to_other_blind] = "#{player.name} whispers."
-      event[:to_target_blind] = "Someone whispers to you#{phrase}"
-
-      room.out_event(event)
-    end
-
-    #Tells someone something.
-    def tell(event, player, room)
-      target = $manager.find event[:target]
-      unless target and target.is_a? Player
-        player.output "That person is not available."
-        return
-      end
-
-      if target == player
-        player.output "Talking to yourself?"
-        return
-      end
-
-      phrase = event[:message]
-
-      last_char = phrase[-1..-1]
-
-      unless ["!", "?", "."].include? last_char
-        phrase << "."
-      end
-
-      phrase[0,1] = phrase[0,1].upcase
-      phrase = phrase.strip.gsub(/\s{2,}/, ' ')
-
-      player.output "You tell #{target.name}, <tell>\"#{phrase}\"</tell>"
-      target.output "#{player.name} tells you, <tell>\"#{phrase}\"</tell>"
-      target.reply_to = player.name
-    end
-
-    #Reply to a tell.
-    def reply(event, player, room)
-      unless player.reply_to
-        player.output "There is no one to reply to."
-        return
-      end
-
-      event[:target] = player.reply_to
-
-      tell(event, player, room)
-    end
-  end
-end
-
diff --git a/lib/aethyr/core/commands/generic.rb b/lib/aethyr/core/commands/generic.rb
index f820393605b8e2ae2394ff65cc1812b946914e94..1f980623197ef29321c9cc051276b7bfa53e98d1 100644
--- a/lib/aethyr/core/commands/generic.rb
+++ b/lib/aethyr/core/commands/generic.rb
@@ -78,7 +78,7 @@ module Aethyr
           def action_health(event)
             @player.output "You are #{@player.health}."
           end
-          
+
           def action_help_health(event)
             @player.output <<'EOF'
 Command: Health
@@ -108,7 +108,7 @@ EOF
           def action_satiety(event)
             @player.output "You are #{@player.satiety}."
           end
-          
+
           def action_help_satiety(event)
             @player.output <<'EOF'
 Command: Hunger (or Satiety)
@@ -139,11 +139,11 @@ EOF
 
           #Display status.
           def action_status(event)
-            @player.output("You are #{@player.health}.", true)
-            @player.output("You are feeling #{@player.satiety}.", true)
+            @player.output("You are #{@player.health}.")
+            @player.output("You are feeling #{@player.satiety}.")
             @player.output "You are currently #{@player.pose || 'standing up'}."
           end
-          
+
           def action_help_status(event)
             @player.output <<'EOF'
 Command: Status
@@ -187,7 +187,7 @@ EOF
               return
             end
           end
-          
+
           def action_help_fill(event)
             @player.output <<'EOF'
 Command: Fill
@@ -207,7 +207,7 @@ EOF
           def action_date(event)
             @player.output $manager.date
           end
-          
+
           def action_help_date_time(event)
             @player.output <<'EOF'
 Date and Time
@@ -231,7 +231,7 @@ EOF
 
             @player.output output
           end
-          
+
           def action_help_who(event)
             @player.output <<'EOF'
 Command: Who
@@ -262,7 +262,7 @@ EOF
               end
             end
           end
-          
+
           def action_help_deleteme(event)
             @player.output <<'EOF'
 Deleting Your Character
@@ -297,7 +297,7 @@ EOF
               @player.output "You finish your writing."
             end
           end
-          
+
           def action_help_write(event)
             @player.output <<'EOF'
 Command: Write
@@ -331,7 +331,7 @@ EOF
             event[:to_other] = "#{@player.name} hesitantly sticks out #{@player.pronoun(:possessive)} tongue and licks #{object.name}."
             room.out_event event
           end
-          
+
           def action_help_taste(event)
             @player.output <<'EOF'
 Command: Taste
@@ -385,7 +385,7 @@ EOF
             event[:to_other] = "#{@player.name} thrusts #{@player.pronoun(:possessive)} nose at #{object.name} and sniffs."
             room.out_event event
           end
-          
+
           def action_help_smell(event)
             @player.output <<'EOF'
 Command: Smell
@@ -431,7 +431,7 @@ EOF
             event[:to_other] = "#{@player.name} bends #{@player.pronoun(:possessive)} head towards #{object.name} and listens."
             room.out_event event
           end
-          
+
           def action_help_listen(event)
             @player.output <<'EOF'
 Command: Listen
@@ -465,7 +465,7 @@ EOF
             event[:to_other] = "#{@player.name} reaches out #{@player.pronoun(:possessive)} hand and touches #{object.name}."
             room.out_event event
           end
-          
+
           def action_help_feel(event)
             @player.output <<'EOF'
 Command: Feel
@@ -476,9 +476,9 @@ Feel the specified target.
 EOF
           end
         end
-        
+
         Aethyr::Extend::HandlerRegistry.register_handler(GenericHandler)
       end
     end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/commands/help_handler.rb b/lib/aethyr/core/commands/help_handler.rb
index a37f385e8f302c46830016792bac352fa42f1b5a..a8fc9965aff3f34316101f20d9e5862f3ae0bcc9 100644
--- a/lib/aethyr/core/commands/help_handler.rb
+++ b/lib/aethyr/core/commands/help_handler.rb
@@ -4,25 +4,23 @@ module Aethyr
   module Extend
     module HandleHelp
       attr_reader :commands
-      
+
       def initialize(player, commands, *args)
         super(player, *args)
-        
+
         @commands = commands
       end
-      
+
       def player_input(data)
         super(data)
         case data[:input]
         when /^(help|help topics)$/i
           if self.can_help?
-            self.commands.each do |command|
-              self.player.output command
-            end
+            self.player.output( commands, false)
           end
         end
       end
-      
+
       def can_help?
         true
       end
@@ -30,10 +28,10 @@ module Aethyr
 
     class HelpHandler
       include Aethyr::Extend::HandleHelp
-      
+
       def initialize(player, commands, *args)
         super
       end
     end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/commands/issue.rb b/lib/aethyr/core/commands/issue.rb
index 7ddfcd3615a3dd41e0245d644453b8ccc07cd798..01122e07bd7cc8fa69e90cb5b96b64d4320b3012 100644
--- a/lib/aethyr/core/commands/issue.rb
+++ b/lib/aethyr/core/commands/issue.rb
@@ -9,7 +9,7 @@ module Aethyr
           def initialize(player)
             super(player, ["bug", "typo", "idea"])
           end
-          
+
           def self.object_added(data)
             return unless data[:game_object].is_a? Player
             data[:game_object].subscribe(IssueHandler.new(data[:game_object]))
@@ -32,7 +32,7 @@ module Aethyr
               action_help({})
             end
           end
-          
+
           private
           def action_help(event)
             player.output <<'EOF'
@@ -49,7 +49,7 @@ These commands allow players and administrators to report and manipulate feedbac
 
 Note that players can only see and edit their own feedback, while adminsitrators will see them all.
 
-BUG <issue> is used to make the initial report.
+BUG [issue] is used to make the initial report.
 BUG LIST will list all reports.
 BUG ADD can be used to append comments to a report.
 BUG STATUS can be used to change the status of a report to a different value (administrators only).
@@ -61,7 +61,7 @@ bug 1
 bug add 1 Actually, this only happens with battleaxes, not all axes.
 EOF
           end
-          
+
           def action(event)
             case event[:option]
             when "new"
diff --git a/lib/aethyr/core/commands/look.rb b/lib/aethyr/core/commands/look.rb
index 5b3acaf27437dc2434699781be331618a72885e5..7b0615bac97eb60ed3ba35344895871d31aa23c9 100644
--- a/lib/aethyr/core/commands/look.rb
+++ b/lib/aethyr/core/commands/look.rb
@@ -96,7 +96,7 @@ EOF
               else
                 if not room.nil?
                   look_text = room.look(@player)
-                  @player.output(look_text, message_type: :look)
+                  @player.output(look_text)
                 else
                   @player.output "Nothing to look at."
                 end
@@ -115,9 +115,9 @@ EOF
             result
           end
         end
-        
+
         Aethyr::Extend::HandlerRegistry.register_handler(LookHandler)
       end
     end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/commands/map.rb b/lib/aethyr/core/commands/map.rb
index 16b84b3417529809978126d2b6276942f6adb659..60b747fcd001d9c5d1dca6b104fe8bd701d081b0 100644
--- a/lib/aethyr/core/commands/map.rb
+++ b/lib/aethyr/core/commands/map.rb
@@ -9,7 +9,7 @@ module Aethyr
           def initialize(player)
             super(player, ["m", "map"])
           end
-          
+
           def self.object_added(data)
             return unless data[:game_object].is_a? Player
             data[:game_object].subscribe(MapHandler.new(data[:game_object]))
@@ -24,7 +24,7 @@ module Aethyr
               action_help({})
             end
           end
-          
+
           private
           def action_help(event)
             player.output <<'EOF'
@@ -34,10 +34,10 @@ Syntax: MAP
 Displays a map of the area.
 EOF
           end
-          
+
           def action(event)
             room = $manager.get_object(@player.container)
-            player.output(room.area.render_map(player, room.area.position(room)), message_type: :map)
+            player.output(room.area.render_map(player, room.area.position(room)))
           end
         end
 
@@ -45,4 +45,4 @@ EOF
       end
     end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/commands/say.rb b/lib/aethyr/core/commands/say.rb
new file mode 100644
index 0000000000000000000000000000000000000000..798cbde7b6e96302c71bcfb229f4242de0dd6871
--- /dev/null
+++ b/lib/aethyr/core/commands/say.rb
@@ -0,0 +1,179 @@
+require "aethyr/core/registry"
+require "aethyr/core/commands/command_handler"
+
+module Aethyr
+  module Core
+    module Commands
+      module Say
+        class SayHandler < Aethyr::Extend::CommandHandler
+          def initialize(player)
+            super(player, ["say", "sayto"])
+          end
+
+          def self.object_added(data)
+            return unless data[:game_object].is_a? Player
+            data[:game_object].subscribe(SayHandler.new(data[:game_object]))
+          end
+
+          def player_input(data)
+            super(data)
+            case data[:input]
+            when /^say\s+(\((.*?)\)\s*)?(.*)$/i
+              action({ :phrase => $3, :pre => $2 })
+            when /^sayto\s+(\w+)\s+(\((.*?)\)\s*)?(.*)$/i
+              action({:target => $1, :phrase => $4, :pre => $3 })
+            when /^help (sayto)$/i
+              action_help_sayto({})
+            when /^help (say)$/i
+              action_help_say({})
+            end
+          end
+
+          private
+          def action_help_say(event)
+            @player.output <<'EOF'
+Command: Say
+Syntax: SAY [message]
+
+This is the basic command for communication.  Everyone in the room hears what you say.
+Some formatting is automatic, and a few emoticons are supported at the end of the command.
+
+Example: say i like cheese
+Output:  You say, "I like cheese."
+
+Example: say i like cheese! :)
+Output:  You smile and exclaim, "I like cheese!"
+
+You can also specify a prefix in parentheses after the say command.
+
+Example: say (in trepidation) are you going to take my cheese?
+Output:  In trepidation, you ask, "Are you going to take my cheese?"
+
+See also: WHISPER, SAYTO
+EOF
+          end
+
+          def action_help_sayto(event)
+            @player.output <<'EOF'
+Command: Say to
+Syntax: SAYTO [name] [message]
+
+Say something to someone in particular, who is in the same room:
+
+Example:
+
+sayto bob i like cheese
+
+Output:
+
+You say to Bob, "I like cheese."
+
+Also supports the same variations as the SAY command.
+
+See also: WHISPER, SAY
+EOF
+          end
+
+          #Says something to the room or to a specific player.
+          def action(event)
+            room = $manager.get_object(@player.container)
+
+            phrase = event[:phrase]
+            target = event[:target] && room.find(event[:target])
+            prefix = event[:pre]
+
+            if prefix
+              prefix << ", "
+            else
+              prefix = ""
+            end
+
+            if phrase.nil?
+              @player.output("Huh?")
+              return
+            elsif event[:target] and target.nil?
+              @player.output("Say what to whom?")
+              return
+            elsif target and target == @player
+              @player.output "Talking to yourself again?"
+              return
+            elsif target
+              to_clause = " to #{target.name}"
+              ask_clause = " #{target.name}"
+            else
+              to_clause = ""
+              ask_clause = ""
+            end
+
+            phrase[0,1] = phrase[0,1].capitalize
+            phrase.gsub!(/(\s|^|\W)(i)(\s|$|\W)/) { |match| match.sub('i', 'I') }
+
+            case phrase
+            when /:\)$/
+              rvoice = "smiles and "
+              pvoice = "smile and "
+            when /:\($/
+              rvoice = "frowns and "
+              pvoice = "frown and "
+            when /:D$/
+              rvoice = "laughs as #{@player.pronoun} "
+              pvoice = "laugh as you "
+            else
+              rvoice = ""
+              pvoice = ""
+            end
+
+            phrase = phrase.gsub(/\s*(:\)|:\()|:D/, '').strip.gsub(/\s{2,}/, ' ')
+
+            case phrase[-1..-1]
+            when "!"
+              pvoice += "exclaim"
+              rvoice += "exclaims"
+            when "?"
+              pvoice += "ask"
+              rvoice += "asks"
+            when "."
+              pvoice += "say"
+              rvoice += "says"
+            else
+              pvoice += "say"
+              rvoice += "says"
+              ender = "."
+            end
+
+            phrase = "<say>\"#{phrase}#{ender}\"</say>"
+
+            event[:target] = target
+            if target and pvoice == "ask"
+              event[:to_target] = prefix + "#{@player.name} #{rvoice} you, #{phrase}"
+              event[:to_player] = prefix + "you #{pvoice} #{target.name}, #{phrase}"
+              event[:to_other] = prefix + "#{@player.name} #{rvoice} #{target.name}, #{phrase}"
+              event[:to_blind_target] = "Someone asks, #{phrase}"
+              event[:to_blind_other] = "Someone asks, #{phrase}"
+              event[:to_deaf_target] = "#{@player.name} seems to be asking you something."
+              event[:to_deaf_other] = "#{@player.name} seems to be asking #{target.name} something."
+            elsif target
+              event[:to_target] = prefix + "#{@player.name} #{rvoice} to you, #{phrase}"
+              event[:to_player] = prefix + "you #{pvoice} to #{target.name}, #{phrase}"
+              event[:to_other] = prefix + "#{@player.name} #{rvoice} to #{target.name}, #{phrase}"
+              event[:to_blind_target] = "Someone #{rvoice}, #{phrase}"
+              event[:to_blind_other] = "Someone #{rvoice}, #{phrase}"
+              event[:to_deaf_target] = "You see #{@player.name} say something to you."
+              event[:to_deaf_other] = "You see #{@player.name} say something to #{target.name}."
+            else
+              event[:to_player] = prefix + "you #{pvoice}, #{phrase}"
+              event[:to_other] = prefix + "#{@player.name} #{rvoice}, #{phrase}"
+              event[:to_blind_other] = "Someone #{rvoice}, #{phrase}"
+              event[:to_deaf_target] = "You see #{@player.name} say something."
+              event[:to_deaf_other] = "You see #{@player.name} say something."
+            end
+
+            room.out_event(event)
+          end
+        end
+
+        Aethyr::Extend::HandlerRegistry.register_handler(SayHandler)
+      end
+    end
+  end
+end
diff --git a/lib/aethyr/core/commands/settings.rb b/lib/aethyr/core/commands/settings.rb
index 5428f4771191fae2caf94f4ee86ebb29cb0ce6a0..f59cc91029c50c2ebe4619b8b4c405a502b2e7b9 100644
--- a/lib/aethyr/core/commands/settings.rb
+++ b/lib/aethyr/core/commands/settings.rb
@@ -83,13 +83,13 @@ module Settings
         player.io.to_default
         player.output "Colors set to defaults."
       else
-        player.output player.io.set_fg_color(event[:option], event[:color])
+        player.output player.io.set_color(event[:option], event[:color])
       end
     end
 
     #Show color configuration.
     def showcolors(event, player, room)
-      player.output player.io.show_color_config
+      player.output player.io.display.show_color_config
     end
 
     def setpassword(event, player, room)
diff --git a/lib/aethyr/core/commands/tell.rb b/lib/aethyr/core/commands/tell.rb
new file mode 100644
index 0000000000000000000000000000000000000000..a66f538af76003e9d03936d58becf5033c4aa902
--- /dev/null
+++ b/lib/aethyr/core/commands/tell.rb
@@ -0,0 +1,105 @@
+require "aethyr/core/registry"
+require "aethyr/core/commands/command_handler"
+
+module Aethyr
+  module Core
+    module Commands
+      module Tell
+        class TellHandler < Aethyr::Extend::CommandHandler
+          def initialize(player)
+            super(player, ["tell", "reply"])
+          end
+
+          def self.object_added(data)
+            return unless data[:game_object].is_a? Player
+            data[:game_object].subscribe(TellHandler.new(data[:game_object]))
+          end
+
+          def player_input(data)
+            super(data)
+            case data[:input]
+            when /^tell\s+(\w+)\s+(.*)$/i
+              action_tell({:target => $1, :message => $2 })
+            when /^reply\s+(.*)$/i
+              action_reply({:message => $1 })
+            when /^help (tell)$/i
+              action_help_tell({})
+            when /^help (reply)$/i
+              action_help_reply({})
+            end
+          end
+
+          private
+          def action_help_tell(event)
+            @player.output <<'EOF'
+Command: Tell
+Syntax: TELL [player] [message]
+
+All inhabitants of Aethyr have the ability to communicate privately with each other over long distances. This is done through the TELL command. Those who investigate these kinds of things claim there is some kind of latent telepathy in all of us. However, while no one knows for certain how it works, everyone knows it does.
+
+Example:
+TELL Justin Hey, how's it going?
+
+
+See also: SAY, SAYTO, WHISPER, REPLY
+EOF
+          end
+
+          def action_help_reply(event)
+            @player.output <<'EOF'
+Command: Reply
+Syntax: REPLY [message]
+
+Reply is a shortcut to send a tell to the last person who sent you a tell.
+
+See also: TELL
+EOF
+          end
+
+          #Tells someone something.
+          def action_tell(event)
+            target = $manager.find event[:target]
+            unless target and target.is_a? Player
+              @player.output "That person is not available."
+              return
+            end
+
+            if target == @player
+              @player.output "Talking to yourself?"
+              return
+            end
+
+            phrase = event[:message]
+
+            last_char = phrase[-1..-1]
+
+            unless ["!", "?", "."].include? last_char
+              phrase << "."
+            end
+
+            phrase[0,1] = phrase[0,1].upcase
+            phrase = phrase.strip.gsub(/\s{2,}/, ' ')
+
+            @player.output "You tell #{target.name}, <tell>\"#{phrase}\"</tell>"
+            target.output "#{@player.name} tells you, <tell>\"#{phrase}\"</tell>"
+            target.reply_to = @player.name
+          end
+
+          #Reply to a tell.
+          def action_reply(event)
+            unless @player.reply_to
+              @player.output "There is no one to reply to."
+              return
+            end
+
+            event[:target] = @player.reply_to
+
+            action_tell(event)
+          end
+        end
+
+        Aethyr::Extend::HandlerRegistry.register_handler(TellHandler)
+      end
+    end
+  end
+end
diff --git a/lib/aethyr/core/commands/whisper.rb b/lib/aethyr/core/commands/whisper.rb
new file mode 100644
index 0000000000000000000000000000000000000000..537c785ead392883ec0f18c9cfa80b62cd35e5ac
--- /dev/null
+++ b/lib/aethyr/core/commands/whisper.rb
@@ -0,0 +1,104 @@
+require "aethyr/core/registry"
+require "aethyr/core/commands/command_handler"
+
+module Aethyr
+  module Core
+    module Commands
+      module Whisper
+        class WhisperHandler < Aethyr::Extend::CommandHandler
+          def initialize(player)
+            super(player, ["whisper"])
+          end
+
+          def self.object_added(data)
+            return unless data[:game_object].is_a? Player
+            data[:game_object].subscribe(WhisperHandler.new(data[:game_object]))
+          end
+
+          def player_input(data)
+            super(data)
+            case data[:input]
+            when /^whisper\s+(\w+)\s+(\((.*?)\)\s*)?(.*)$/i
+              action({ :to => $1, :phrase => $4, :pre => $3 })
+            when /^help (whisper)$/i
+              action_help({})
+            end
+          end
+
+          private
+          def action_help(event)
+            @player.output <<'EOF'
+Command: Whisper
+Syntax: WHISPER [person] [message]
+
+To communicate with someone in the same room, but privately, use this command.
+
+Example:
+
+whisper justin that dog needs a bath
+
+Output:
+
+You whisper to Justin, "That dog needs a bath."
+
+
+See also: SAY
+EOF
+          end
+
+          #Whispers to another thing.
+          def action(event)
+            room = $manager.get_object(@player.container)
+            object = room.find(event[:to], Player)
+
+            if object.nil?
+              @player.output("To whom are you trying to whisper?")
+              return
+            elsif object == @player
+              @player.output("Whispering to yourself again?")
+              event[:to_other] = "#{@player.name} whispers to #{@player.pronoun(:reflexive)}."
+              room.out_event(event, @player)
+              return
+            end
+
+            phrase = event[:phrase]
+
+            if phrase.nil?
+              @player.ouput "What are you trying to whisper?"
+              return
+            end
+
+            prefix = event[:pre]
+
+            if prefix
+              prefix << ", "
+            else
+              prefix = ""
+            end
+
+            phrase[0,1] = phrase[0,1].capitalize
+
+            last_char = phrase[-1..-1]
+
+            unless ["!", "?", "."].include? last_char
+              ender = "."
+            end
+
+            phrase = ", <say>\"#{phrase}#{ender}\"</say>"
+
+            event[:target] = object
+            event[:to_player] = prefix + "you whisper to #{object.name}#{phrase}"
+            event[:to_target] = prefix + "#{@player.name} whispers to you#{phrase}"
+            event[:to_other] = prefix + "#{@player.name} whispers quietly into #{object.name}'s ear."
+            event[:to_other_blind] = "#{@player.name} whispers."
+            event[:to_target_blind] = "Someone whispers to you#{phrase}"
+
+            room.out_event(event)
+          end
+        end
+
+        Aethyr::Extend::HandlerRegistry.register_handler(WhisperHandler)
+      end
+    end
+  end
+end
diff --git a/lib/aethyr/core/components/storage.rb b/lib/aethyr/core/components/storage.rb
index 688fb58504c635ec3a8b83b67475cabfeea5a954..50c28333a9d17fc145c104545a1da219214e6a7b 100644
--- a/lib/aethyr/core/components/storage.rb
+++ b/lib/aethyr/core/components/storage.rb
@@ -64,8 +64,9 @@ class StorageMachine
     end
 
     #Yeah, so whatever on this little deal. Probably should do it better later.
-    player.use_color = player.io.use_color if player.io
-    player.color_settings = player.io.color_settings if player.io
+    player.use_color = player.io.display.use_color if player.io
+    player.color_settings = player.io.display.color_settings if player.io
+    player.layout = player.io.display.layout_type if player.io
 
     #Okay, this is tricky. We can't serialize the IO object stored in the Player
     #objects. To get around this (we don't want to store it anyhow), we temporarily
@@ -509,4 +510,3 @@ class StorageMachine
 
   public :update_all_objects!
 end
-
diff --git a/lib/aethyr/core/connection/login.rb b/lib/aethyr/core/connection/login.rb
index 08eb33c6effa0fba3ad3a1d390f5cb26db008b29..8f7059aa5fb66be577398855d82400f1141224b6 100644
--- a/lib/aethyr/core/connection/login.rb
+++ b/lib/aethyr/core/connection/login.rb
@@ -8,14 +8,14 @@ require 'aethyr/core/errors'
 module Login
 
   #Get input from io connection and process it
-  def receive_data(data)
-    return if data.nil?
-    data = preprocess_input(data)
-    return if data == ''
+  def receive_data
+    data = @display.recv
+    return false if data.nil?
+    return false if data == ''
 
     if data[-1,1] != "\n"
       @in_buffer << data
-      return
+      return true
     elsif not @in_buffer.empty?
       data = @in_buffer.join + data
       @in_buffer.clear
@@ -38,6 +38,10 @@ module Login
         @player.handle_input d
       else
         case @state
+        when :initial
+          show_resolution_prompt
+        when :resolution
+          do_resolution d
         when :server_menu
           do_server_menu d
         when :login_name
@@ -57,6 +61,32 @@ module Login
         end
       end
     end
+    return true
+  end
+
+  def show_initial
+    show_resolution_prompt
+  end
+
+  #Show login menu
+  def show_resolution_prompt
+    output "Would you like color (Y/n)? "
+    @state = :resolution
+  end
+
+  def do_resolution(data)
+    data.strip!
+    log "resolution getting done: #{data}"
+    case data
+    when  /([nNyY]{1})/
+      display.init_colors if $1.downcase.eql? "y"
+      show_server_menu
+    when  ""
+      display.init_colors
+      show_server_menu
+    else
+      show_resolution_prompt
+    end
   end
 
   #Show login menu
@@ -129,11 +159,9 @@ module Login
       return
     end
 
-    if player.color_settings.nil?
-      @use_color = false
-    else
-      @color_settings = player.color_settings
-    end
+
+    @display.color_settings = player.color_settings unless player.color_settings.nil?
+    @display.layout(layout: player.layout, in_combat: player.info.in_combat) unless player.layout.nil?
 
     @word_wrap = player.word_wrap
     player.instance_variable_set(:@player, self)
diff --git a/lib/aethyr/core/connection/player_connect.rb b/lib/aethyr/core/connection/player_connect.rb
index d2bfa7b43e78648526c61ed518001d8d2173ed59..025cadbb2c7992156970e2687f0df669b820db92 100644
--- a/lib/aethyr/core/connection/player_connect.rb
+++ b/lib/aethyr/core/connection/player_connect.rb
@@ -16,36 +16,29 @@ class PlayerConnection
 
   #Input buffer
   attr_reader :in_buffer, :display
-  attr_accessor :color_settings, :use_color, :word_wrap
-  
+  attr_accessor :word_wrap
+
   def initialize(display, addrinfo, *args)
     super(*args)
     @display = display
 
     @in_buffer = []
     @paginator = nil
-    @color_settings = color_settings || to_default
-    @use_color = false
     @mccp_to_client = false
     @mccp_from_client = false
     @word_wrap = 120
     @closed = false
-    @state = :server_menu
+    @state = :initial
     @login_name = nil
     @login_password = nil
     @password_attempts = 0
     @player = nil
     @expect_callback = nil
     @ip_address = Socket.unpack_sockaddr_in(addrinfo)[1]
-    @color_stack = []
 
     print(File.read(ServerConfig.intro_file), false) if File.exist? ServerConfig.intro_file
 
-    ask_mssp if ServerConfig[:mssp]
-
-    ask_mccp if ServerConfig[:mccp]
-
-    show_server_menu
+    show_initial
 
     log "Connection from #{@ip_address}."
   end
@@ -93,45 +86,6 @@ class PlayerConnection
     end
   end
 
-  def send_data( message, message_type: :main)
-    message = compress message if @mccp_to_client
-    
-    @display.send( message, message_type: message_type)
-  end
-
-  #Sets colors to defaults
-  def to_default
-    @use_color = false
-    @color_settings = {
-      "roomtitle" => "fg:green bold",
-      "object" => "fg:blue",
-      "player" => "fg:cyan",
-      "mob" => "fg:yellow bold",
-      "merchant" => "fg:yellow dim",
-      "me" => "fg:white bold",
-      "exit" => "fg:green",
-      "say" => "fg:white bold",
-      "tell" => "fg:cyan bold",
-      "important" => "fg:red bold",
-      "editor" => "fg:cyan",
-      "news" => "fg:cyan bold",
-      "identifier" => "fg:magenta bold",
-      "water" => "fg:blue",
-      "waterlow" => "fg:blue dim",
-      "waterhigh" => "fg:blue bold",
-      "earth" => "fg:dark_goldenrod",
-      "earthlow" => "fg:dark_goldenrod dim",
-      "earthhigh" => "fg:dark_goldenrod bold",
-      "air" => "fg:white",
-      "airlow" => "fg:white dim",
-      "airhigh" => "fg:white bold",
-      "fire" => "fg:red",
-      "firelow" => "fg:red dim",
-      "firehigh" => "fg:red bold",
-      "regular" => "fg:gray"
-    }
-  end
-
   #Checks if the io connection is nil or closed
   def closed?
     @closed
@@ -139,11 +93,11 @@ class PlayerConnection
 
   #Sends message followed by a newline. Also capitalizes
   #the first letter in the message.
-  def send_puts( message, message_type: :main)
+  def send_puts( message, no_newline = false, message_type: :main)
     message = message.to_s
     first = message.index(/[a-zA-Z]/)
     message[first,1] = message[first,1] unless first.nil?
-    self.print(message, true, true, message_type: message_type)
+    self.print(message, true, !no_newline, message_type: message_type)
   end
 
   alias :output :send_puts
@@ -160,315 +114,11 @@ class PlayerConnection
 
   #Send message without newline
   def print(message, parse = true, newline = false, message_type: :main)
-    unless closed?
-      if parse
-        colorize message
-        message.gsub!(/\t/, '     ')
-        message = paginate(message)
-      end
-      if newline and message[-1..-1] != "\n"
-        if message[-2..-2] == "\r"
-          message << "\n"
-        else
-          message << "\r\n"
-        end
-      end
-      if @use_color
-        regular_format = FormatState.new(@color_settings["regular"])
-        message = regular_format.apply + message + regular_format.revert
-      end
-      send_data( message, message_type: message_type)
-    end
-  end
-
-  def paginate message
-    if @player.nil?
-      return line_wrap(message)
-    elsif not @player.page_height
-      return line_wrap(message)
-    #elsif not @word_wrap
-      #return message.gsub(/([^\r]?)\n/, '\1' + "\r\n")
-    end
-
-    ph = @player.page_height
-
-    out = []
-    #message = message.gsub(/((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m|[^\r\n\n\s\Z]){#@word_wrap})/, "\\1 ") if @word_wrap
-    message = wrap(message, @word_wrap).join("\r\n") if @word_wrap
-    message.scan(/((((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m)|.){1,#{@word_wrap}})(\r\n|\n|\s+|\Z))|(\r\n|\n)/) do |m|
-      if $2
-        out << $2
-      else
-        out << ""
-      end
-    end
-
-    if out.length < ph
-      return out.join("\r\n")
-    end
-
-    @paginator = KPaginator.new(self, out)
-    @paginator.more
-  end
-
-  #Only use if there is no line height
-  def line_wrap message
-    message = wrap(message, @word_wrap).join("\n") if @word_wrap
-    #message = message.gsub(/((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m|[^\r\n\n\s\Z]){#{@word_wrap}})/, "\\1 ") if @word_wrap
-    message.gsub(/(((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m)|.){1,#{@word_wrap}})(\r\n|\n|\s+|\Z)/, "\\1\n")
-  end
-
-  #Next page of paginated output
-  def more
-    if @paginator and @paginator.more?
-      self.print(@paginator.more, false)
-      if not @paginator.more?
-        @paginator = nil
-      end
-    else
-      @paginator = nil
-      self.puts "There is no more."
-    end
-  end
-
-  #Sets the colors in the string according to the player's preferences.
-  def colorize string
-    colors = @color_settings.keys.dup
-    colors << "raw[^>]*"
-    colors = colors.join("|")
-    if @use_color
-      string.gsub!(/<([\/]{0,1})(#{colors})>/i) do |setting|
-        if ($1.nil?) || ($1.length <= 0)
-          color_encode($2) 
-        else
-          color_decode($2)
-        end
-      end
-      #string.gsub!(/<\/([^>]*)>/, @@colors[@color_settings["regular"]])
-      #string.gsub!(/(\"(.*?)")/, @color_settings["quote"] + '\1' + @color_settings["regular"])
-    else
-      string.gsub!(/<([^>]*)>/i, "")
-      string.gsub!(/<\/([^>]*)>/, "")
-    end
-    
-    string
-  end
-  
-  def color_encode(code)
-    parent = @color_stack[-1]
-    code = code.downcase
-    unless code.start_with? "raw "
-      result = FormatState.new(@color_settings[code], parent)
-    else
-      /raw (?<code>.*)/ =~ code
-      result = FormatState.new(code, parent)
-    end
-    @color_stack << result
-    result.apply
-  end
-  
-  def color_decode(code)
-    @color_stack.pop.revert
-  end
-
-  #Sets the foreground color for a given setting.
-  def set_fg_color(code, color)
-    code.downcase! unless code.nil?
-    color.downcase! unless color.nil?
-
-    if not @color_settings.has_key? code
-      "No such setting: #{code}"
-    else
-      if not @use_color
-        @color_settings.keys.each do |setting|
-          @color_settings[setting] = ""
-        end
-        @use_color = true
-      end
-
-      @color_settings[code] = color
-      "Set #{code} to <#{code}>#{color}</#{code}>."
-    end
-  end
-
-  #Returns list of color settings to show the player
-  def show_color_config
-  <<-CONF
-Colors are currently: #{@use_color ? "Enabled" : "Disabled"}
-Text                Setting          Color
------------------------------------------------
-Room Title          roomtitle        <roomtitle>#{@color_settings['roomtitle']}</roomtitle>
-Object              object           <object>#{@color_settings['object']}</object>
-Player              player           <player>#{@color_settings['player']}</player>
-Mob                 mob              <mob>#{@color_settings['mob']}</mob>
-Merchant            merchant         <merchant>#{@color_settings['merchant']}</merchant>
-Me                  me               <me>#{@color_settings['me']}</me>
-Exit                exit             <exit>#{@color_settings['exit']}</exit>
-Say                 say              <say>#{@color_settings['say']}</say>
-Tell                tell             <tell>#{@color_settings['tell']}</tell>
-Important           important        <important>#{@color_settings['important']}</important>
-Editor              editor           <editor>#{@color_settings['editor']}</editor>
-News                news             <news>#{@color_settings['news']}</news>
-Identifier          identifier       <identifier>#{@color_settings['identifier']}</identifier>
-Fire                fire             <fire>#{@color_settings['fire']}</fire>
-Fire when low       firelow          <firelow>#{@color_settings['firelow']}</firelow>
-Fire when high      firehigh         <firehigh>#{@color_settings['firehigh']}</firehigh>
-Air                 air              <air>#{@color_settings['air']}</air>
-Air when low        airlow           <airlow>#{@color_settings['airlow']}</airlow>
-Air when high       airhigh          <airhigh>#{@color_settings['airhigh']}</airhigh>
-Water               water            <water>#{@color_settings['water']}</water>
-Water when low      waterlow         <waterlow>#{@color_settings['waterlow']}</waterlow>
-Water when high     waterhigh        <waterhigh>#{@color_settings['waterhigh']}</waterhigh>
-Earth               earth            <earth>#{@color_settings['earth']}</earth>
-Earth when low      earthlow         <earthlow>#{@color_settings['earthlow']}</earthlow>
-Earth when high     earthhigh        <earthhigh>#{@color_settings['earthhigh']}</earthhigh>
-Regular             regular          #{@color_settings['regular']}
-CONF
-
+    @display.send(message, parse, add_newline: newline, message_type: message_type) unless closed?
   end
 
   #Close the io connection
   def close
     close_connection_after_writing
   end
-
-  def ask_mccp
-    log "asking mccp"
-    @display.send_raw IAC + WILL + OPT_COMPRESS2
-  end
-
-  def ask_mssp
-    log "asking mssp"
-    @display.send_raw IAC + WILL + OPT_MSSP
-  end
-
-  def send_mssp
-    log "sending mssp"
-    mssp_options = nil
-    options = IAC + SB + OPT_MSSP
-
-    if File.exist? "conf/mssp.yaml"
-      File.open "conf/mssp.yaml" do |f|
-        mssp_options = YAML.load(f)
-      end
-
-      mssp_options.each do |k,v|
-        options << (MSSP_VAR + k + MSSP_VAL + v.to_s)
-      end
-    end
-
-    options << (MSSP_VAR + "PLAYERS" + MSSP_VAL + $manager.find_all("class", Player).length.to_s)
-    options << (MSSP_VAR + "UPTIME" + MSSP_VAL + $manager.uptime.to_s)
-    options << (MSSP_VAR + "ROOMS" + MSSP_VAL + $manager.find_all("class", Room).length.to_s)
-    options << (MSSP_VAR + "AREAS" + MSSP_VAL + $manager.find_all("class", Area).length.to_s)
-    options << (MSSP_VAR + "ANSI" + MSSP_VAL + "1")
-    options << (MSSP_VAR + "FAMILY" + MSSP_VAL + "CUSTOM")
-    options << (MSSP_VAR + "CODEBASE" + MSSP_VAL + "Aethyr " + $AETHYR_VERSION)
-    options << (MSSP_VAR + "PORT" + MSSP_VAL + ServerConfig.port.to_s)
-    options << (MSSP_VAR + "MCCP" + MSSP_VAL + (ServerConfig[:mccp] ? "1" : "0"))
-    options << (IAC + SE)
-    @display.send_raw options
-  end
-
-  #Use zlib to compress message (for MCCP)
-  def compress message
-    begin
-      @mccp_to_client.deflate message, Zlib::SYNC_FLUSH
-    rescue Zlib::DataError
-      message
-    end
-  end
-
-  #Use zlib to decompress message (for MCCP)
-  def decompress message
-    p message
-    #message =  "\x78\x01" + message
-
-    begin
-      Zlib::Inflate.inflate message
-    rescue Zlib::DataError
-      message
-    end
-  end
-
-  #Pulled straight out of standard net/telnet lib.
-  #Orginal version by Wakou Aoyama <wakou@ruby-lang.org>
-  def preprocess_input string
-    if @mccp_from_client
-      string = decompress string
-    end
-    # combine CR+NULL into CR
-    string = string.gsub(/#{CR}#{NULL}/no, CR)
-
-      # combine EOL into "\n"
-      string = string.gsub(/#{EOL}/no, "\n")
-
-      string.gsub!(/#{IAC}(
-        [#{IAC}#{AO}#{AYT}#{DM}#{IP}#{NOP}]|
-        [#{DO}#{DONT}#{WILL}#{WONT}]
-    [#{OPT_BINARY}-#{OPT_COMPRESS2}#{OPT_EXOPL}]|
-    #{SB}[^#{IAC}]*#{IAC}#{SE}
-    )/xno) do
-      if    IAC == $1  # handle escaped IAC characters
-        IAC
-      elsif AYT == $1  # respond to "IAC AYT" (are you there)
-        send_data("nobody here but us pigeons" + EOL)
-        ''
-      elsif DO == $1[0,1]  # respond to "IAC DO x"
-        if OPT_BINARY == $1[1,1]
-          send_data(IAC + WILL + OPT_BINARY)
-        elsif OPT_MSSP == $1[1,1]
-          send_mssp
-        elsif OPT_COMPRESS2 == $1[1,1] and ServerConfig[:mccp]
-          begin
-            require 'zlib'
-            send_data(IAC + SB + OPT_COMPRESS2 + IAC + SE)
-            @mccp_to_client = Zlib::Deflate.new
-          rescue LoadError
-            log "Warning: No zlib - cannot do MCCP"
-            send_data(IAC + WONT + $1[1..1])
-            return
-          end
-
-        else
-          #send_data(IAC + WONT + $1[1..1])
-        end
-        ''
-      elsif DONT == $1[0,1]  # respond to "IAC DON'T x" with "IAC WON'T x"
-        if OPT_COMPRESS2 == $1[1,1]
-          @mccp_to_client = false
-          send_data(IAC + WONT + $1[1..1])
-        end
-        ''
-      elsif WILL == $1[0,1]  # respond to "IAC WILL x"
-        if OPT_BINARY == $1[1,1]
-          send_data(IAC + DO + OPT_BINARY)
-        elsif OPT_ECHO == $1[1,1]
-          send_data(IAC + DO + OPT_ECHO)
-        elsif OPT_SGA  == $1[1,1]
-          send_data(IAC + DO + OPT_SGA)
-        elsif OPT_COMPRESS2 == $1[1,1]
-          send_data(IAC + DONT + OPT_COMPRESS2)
-        else
-          send_data(IAC + DONT + $1[1..1])
-        end
-        ''
-      elsif WONT == $1[0,1]  # respond to "IAC WON'T x"
-        if OPT_ECHO == $1[1,1]
-          send_data(IAC + DONT + OPT_ECHO)
-        elsif OPT_SGA  == $1[1,1]
-          send_data(IAC + DONT + OPT_SGA)
-        elsif OPT_COMPRESS2 == $1[1,1]
-          @mccp_from_client = false
-          send_data(IAC + DONT + OPT_COMPRESS2)
-        else
-          send_data(IAC + DONT + $1[1..1])
-        end
-        ''
-      else
-        ''
-      end
-    end
-    return string
-  end
 end
diff --git a/lib/aethyr/core/connection/server.rb b/lib/aethyr/core/connection/server.rb
index 36d21a819bcbdca287bd7368198268ac94ea892f..4d4d3c77160279517302110b3c1a9b8ae9e85e3a 100644
--- a/lib/aethyr/core/connection/server.rb
+++ b/lib/aethyr/core/connection/server.rb
@@ -6,13 +6,13 @@ Copyright:      2018, Jeffrey Phillips Freeman
 License:        Apache v2
 
     Copyright 2017 - 2018, Jeffrey Phillips Freeman
-    
+
     Licensed under the Apache License, Version 2.0 (the "License");
     you may not use this file except in compliance with the License.
     You may obtain a copy of the License at
-    
+
         http://www.apache.org/licenses/LICENSE-2.0
-    
+
     Unless required by applicable law or agreed to in writing, software
     distributed under the License is distributed on an "AS IS" BASIS,
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -39,22 +39,23 @@ module Aethyr
       #Creates the Manager, starts the EventMachine, and closes everything down when the time comes.
       def initialize(address, port)
         $manager = Manager.new
-        
+
         updateTask = Concurrent::TimerTask.new(execution_interval: ServerConfig.update_rate, timeout_interval: 10) do
           $manager.update_all
         end
         saveTask = Concurrent::TimerTask.new(execution_interval: ServerConfig.save_rate, timeout_interval: 30) do
-          log "Automatic state save."; $manager.save_all
+          log "Automatic state save."
+          $manager.save_all
         end
-        
+
         updateTask.execute
         saveTask.execute
-        
+
         listener = server_socket('0.0.0.0', 8888)
-        
+
         File.open("logs/server.log", "a") { |f| f.puts "#{Time.now} Server started." }
         log "Server up and running on #{address}:#{port}", 0
-        
+
         players = Set.new()
         loop do
           did_something = false
@@ -65,16 +66,14 @@ module Aethyr
             did_something = true
             players << handle_client(socket, addr_info)
           end
-          
+
           players.each do |player|
-            recvd = player.display.recv
-            did_something = true unless recvd.nil?
-            player.receive_data(recvd)
+            did_something = true if player.receive_data
           end
-          
+
           sleep 0.1 unless did_something
         end
-        
+
 #        4.times do # Adjust this number for the pool size
 #          next unless fork.nil? # Parent only calls fork
 #          loop do # Child does this work
@@ -85,7 +84,7 @@ module Aethyr
 
         clean_up_children
         return 0 # Return code
-        
+
 #        EventMachine.run do
 #          EventMachine.add_periodic_timer(ServerConfig.update_rate) { $manager.update_all }
 #          if ServerConfig.save_rate and ServerConfig.save_rate > 0
@@ -108,7 +107,7 @@ module Aethyr
         $manager.save_all
         log "Objects saved.", Logger::Normal, true
       end
-      
+
       private
       def server_socket(addr, port)
         socket = Socket.new(:INET, :SOCK_STREAM)
@@ -118,7 +117,7 @@ module Aethyr
         puts 'Waiting for connections...'
         socket
       end
-      
+
       def handle_client(socket, addrinfo)
         begin
           display = Display.new(socket)
@@ -129,7 +128,7 @@ module Aethyr
           puts "       Reset: #{addrinfo.inspect}\n"
         end
       end
-      
+
       def clean_up_children
         loop do
           Process.wait # Gather processes as they exit
@@ -139,7 +138,7 @@ module Aethyr
       rescue SystemCallError
         puts 'All children have exited. Goodbye!'
       end
-      
+
 #      def process_requests(socket)
 #        begin
 #          # initialize ncurses
@@ -198,16 +197,16 @@ module Aethyr
 #        end
 #      end
     end
-    
-    def self.main        
+
+    def self.main
           if ARGV[0]
             server_restarts = ARGV[0].to_i
           else
             server_restarts = 0
           end
-        
+
           log "Server restart ##{server_restarts}"
-        
+
           begin
             #result = RubyProf.profile do
             Server.new(ServerConfig.address, ServerConfig.port)
@@ -223,13 +222,13 @@ module Aethyr
               else
                 File.open("logs/server.log", "a+") { |f| f.puts "#{Time.now} Server restart on error or interrupt." }
               end
-        
+
               log "SERVER RESTARTING - Attempting to restart in 10 seconds...press ^C to stop...", Logger::Important
               sleep ServerConfig.restart_delay
               log "RESTARTING SERVER", Logger::Important, true
-        
+
               program_name = ENV["_"] || "ruby"
-        
+
               if $manager and $manager.soft_restart
                 exec("#{program_name} server.rb")
               else
diff --git a/lib/aethyr/core/connection/telnet.rb b/lib/aethyr/core/connection/telnet.rb
new file mode 100644
index 0000000000000000000000000000000000000000..3000919204a2191abc06ca39b8760b5c2c665eaa
--- /dev/null
+++ b/lib/aethyr/core/connection/telnet.rb
@@ -0,0 +1,224 @@
+require 'socket'
+require 'aethyr/core/connection/telnet_codes'
+
+class TelnetScanner
+  PREAMBLE = [IAC + DO + OPT_LINEMODE,
+              IAC + SB + OPT_LINEMODE + OPT_ECHO + OPT_BINARY + IAC + SE,
+              IAC + WILL + OPT_ECHO,
+              IAC + WILL + OPT_MSSP,
+              IAC + WONT + OPT_COMPRESS2,
+              IAC + DO + OPT_NAWS]
+
+  def initialize(socket, display)
+    @socket = socket
+    @display = display
+    @linemode_supported = false
+    @naws_supported = false
+    @echo_supported = false
+  end
+
+  def send_preamble
+    PREAMBLE.each do |line|
+      @socket.puts line
+    end
+  end
+
+  def supports_naws(does_it)
+    if does_it
+      @supports_naws = true
+      log "Client supports NAWS"
+    else
+      @supports_naws = false
+      log "Client does NOT support NAWS"
+    end
+  end
+
+  def send_mssp
+    log "sending mssp"
+    mssp_options = nil
+    options = IAC + SB + OPT_MSSP
+
+    if File.exist? "conf/mssp.yaml"
+      File.open "conf/mssp.yaml" do |f|
+        mssp_options = YAML.load(f)
+      end
+
+      mssp_options.each do |k,v|
+        options << (MSSP_VAR + k + MSSP_VAL + v.to_s)
+      end
+    end
+
+    options << (MSSP_VAR + "PLAYERS" + MSSP_VAL + $manager.find_all("class", Player).length.to_s)
+    options << (MSSP_VAR + "UPTIME" + MSSP_VAL + $manager.uptime.to_s)
+    options << (MSSP_VAR + "ROOMS" + MSSP_VAL + $manager.find_all("class", Room).length.to_s)
+    options << (MSSP_VAR + "AREAS" + MSSP_VAL + $manager.find_all("class", Area).length.to_s)
+    options << (MSSP_VAR + "ANSI" + MSSP_VAL + "1")
+    options << (MSSP_VAR + "FAMILY" + MSSP_VAL + "CUSTOM")
+    options << (MSSP_VAR + "CODEBASE" + MSSP_VAL + "Aethyr " + $AETHYR_VERSION)
+    options << (MSSP_VAR + "PORT" + MSSP_VAL + ServerConfig.port.to_s)
+    options << (MSSP_VAR + "MCCP" + MSSP_VAL + (ServerConfig[:mccp] ? "1" : "0"))
+    options << (IAC + SE)
+    @display.send_raw options
+  end
+
+  def process_iac
+    log "doing process_iac"
+
+    iac_state = :none if iac_state.nil?
+    while ch = @socket.recv(1, Socket::MSG_PEEK) do
+      ch = ch.chr
+      log "processing #{ch.ord}"
+      if iac_state == :none && ch == IAC
+        @socket.recv(1)
+        iac_state = :IAC
+        next
+      elsif iac_state == :none
+          return true
+      elsif iac_state != :none
+        @socket.recv(1) if iac_state != IAC || ch != IAC
+        case iac_state
+
+        when :IAC
+          if ch == WILL
+            iac_state = :IAC_WILL
+          elsif ch == SB
+            iac_state = :IAC_SB
+          elsif ch == WONT
+            iac_state = :IAC_WONT
+          elsif ch == DONT
+            iac_state = :IAC_DONT
+          elsif ch == DO
+            iac_state = :IAC_DO
+          elsif ch == IAC
+            iac_state = :none
+            return true
+          else
+            iac_state = :none
+          end
+
+        when :IAC_WILL
+          if OPT_BINARY == ch
+            @socket.puts(IAC + DO + OPT_BINARY)
+          elsif ch == OPT_NAWS
+            supports_naws(true)
+          elsif ch == OPT_LINEMODE
+            @linemode_supported = true
+          elsif OPT_ECHO == ch
+            @socket.puts(IAC + DONT + OPT_ECHO)
+          elsif OPT_SGA  == ch
+            @socket.puts(IAC + DO + OPT_SGA)
+          else
+            @socket.puts(IAC + DONT + ch)
+          end
+          iac_state = :none
+
+        when :IAC_WONT
+          if ch == OPT_LINEMODE
+            @linemode_supported = false
+          elsif ch == OPT_NAWS
+            supports_naws(false)
+          else
+            @socket.puts(IAC + DONT + ch)
+          end
+          iac_state = :none
+
+        when :IAC_DO
+          if ch == OPT_BINARY
+            @socket.puts(IAC + WILL + OPT_BINARY)
+          elsif ch == OPT_ECHO
+            @echo_supported = true
+          elsif ch == OPT_MSSP
+            send_mssp
+            @mssp_supported = true
+          else
+            @socket.puts(IAC + WONT + ch)
+          end
+          iac_state = :none
+
+        when :IAC_DONT
+          if ch == OPT_ECHO
+            @echo_supported = false
+          elsif ch == OPT_COMPRESS2
+            #do nothing
+          elsif ch == OPT_MSSP
+            @mssp_supported = false
+          else
+            @socket.puts(IAC + WONT + ch)
+          end
+          iac_state = :none
+
+        when :IAC_SB
+          if ch == OPT_NAWS
+            iac_state = :IAC_SB_NAWS
+          else
+            iac_state = :IAC_SB_SOMETHING
+          end
+
+        when :IAC_SB_NAWS
+          lwidth = ch.ord
+          iac_state = :IAC_SB_NAWS_LWIDTH
+          if ch == IAC && @socket.getch != IAC
+            log "escaped IAC expected but not found"
+            break
+          end
+
+        when :IAC_SB_NAWS_LWIDTH
+          hwidth = ch.ord
+          iac_state = :IAC_SB_NAWS_LWIDTH_HWIDTH
+          if ch == IAC && @socket.getch != IAC
+            log "escaped IAC expected but not found"
+            break
+          end
+
+        when :IAC_SB_NAWS_LWIDTH_HWIDTH
+          lheight = ch.ord
+          iac_state = :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT
+          if ch == IAC && @socket.getch != IAC
+            log "escaped IAC expected but not found"
+            break
+          end
+
+        when :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT
+          hheight = ch.ord
+          iac_state = :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT_HHEIGHT
+          if ch == IAC && @socket.getch != IAC
+            log "escaped IAC expected but not found"
+            break
+          end
+
+        when :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT_HHEIGHT
+          if ch == IAC
+            iac_state = :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT_HHEIGHT_IAC
+          else
+            log "invalid IAC"
+            iac_state = :none
+          end
+
+        when :IAC_SB_NAWS_LWIDTH_HWIDTH_LHEIGHT_HHEIGHT_IAC
+          if ch == SE
+            new_width = lwidth*256 + hwidth
+            new_height = lheight*256 + hheight
+            log "setting resolution #{new_width} #{new_height}"
+            @display.resolution = [new_width, new_height]
+          else
+            log "invalid IAC"
+          end
+          iac_state = :none
+        when :IAC_SB_SOMETHING
+          iac_state = :IAC_SB_SOMETHING_IAC if ch == IAC
+
+        when :IAC_SB_SOMETHING_IAC
+          iac_state = :IAC_SB_SOMETHING if ch == IAC
+          iac_state = :none if ch == SE
+        else
+          iac_state = :none
+        end
+      else
+        log "Invalid IAC logic #{iac_state} #{ch}"
+        return false
+      end
+    end
+
+    return false
+  end
+end
diff --git a/lib/aethyr/core/help/bug.help b/lib/aethyr/core/help/bug.help
index f4f7cae273dc959ee696a84b3de0a0e29c6c02de..2b807760ce053c13cf6d6a2e485e523c8403e346 100644
--- a/lib/aethyr/core/help/bug.help
+++ b/lib/aethyr/core/help/bug.help
@@ -1,11 +1,11 @@
 Command: Bug
 Command: Idea
 Command: Typo
-Syntax: [BUG|IDEA|TYPO] <issue>
-Syntax: [BUG|IDEA|TYPO] <id number>
+Syntax: [BUG|IDEA|TYPO] [issue]
+Syntax: [BUG|IDEA|TYPO] [id number]
 Syntax: [BUG|IDEA|TYPO] LIST
-Syntax: [BUG|IDEA|TYPO] STATUS <id_number> <status>
-Syntax: [BUG|IDEA|TYPO] [SHOW|ADD|DEL] <id_number>
+Syntax: [BUG|IDEA|TYPO] STATUS [id_number] [status]
+Syntax: [BUG|IDEA|TYPO] [SHOW|ADD|DEL] [id_number]
 
 These commands allow players and administrators to report and manipulate feedback about the game. The commands are essentially identical, but should be used to report different things. For the rest of this description, BUG is used.
 
diff --git a/lib/aethyr/core/help/idea.help b/lib/aethyr/core/help/idea.help
index f4f7cae273dc959ee696a84b3de0a0e29c6c02de..2b807760ce053c13cf6d6a2e485e523c8403e346 100644
--- a/lib/aethyr/core/help/idea.help
+++ b/lib/aethyr/core/help/idea.help
@@ -1,11 +1,11 @@
 Command: Bug
 Command: Idea
 Command: Typo
-Syntax: [BUG|IDEA|TYPO] <issue>
-Syntax: [BUG|IDEA|TYPO] <id number>
+Syntax: [BUG|IDEA|TYPO] [issue]
+Syntax: [BUG|IDEA|TYPO] [id number]
 Syntax: [BUG|IDEA|TYPO] LIST
-Syntax: [BUG|IDEA|TYPO] STATUS <id_number> <status>
-Syntax: [BUG|IDEA|TYPO] [SHOW|ADD|DEL] <id_number>
+Syntax: [BUG|IDEA|TYPO] STATUS [id_number] [status]
+Syntax: [BUG|IDEA|TYPO] [SHOW|ADD|DEL] [id_number]
 
 These commands allow players and administrators to report and manipulate feedback about the game. The commands are essentially identical, but should be used to report different things. For the rest of this description, BUG is used.
 
diff --git a/lib/aethyr/core/help/reply.help b/lib/aethyr/core/help/reply.help
deleted file mode 100644
index ab6101858ae6f3426d6075cbe19a873f7431b447..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/help/reply.help
+++ /dev/null
@@ -1,6 +0,0 @@
-Command: Reply
-Syntax: REPLY <message>
-
-Reply is a shortcut to send a tell to the last person who sent you a tell.
-
-See also: TELL
diff --git a/lib/aethyr/core/help/say.help b/lib/aethyr/core/help/say.help
deleted file mode 100644
index 9c681868f8e8d93f49d8207d7c4cabfab176ef6e..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/help/say.help
+++ /dev/null
@@ -1,18 +0,0 @@
-Command: Say
-Syntax: SAY <message>
-
-This is the basic command for communication.  Everyone in the room hears what you say.
-Some formatting is automatic, and a few emoticons are supported at the end of the command.
-
-Example: say i like cheese
-Output:  You say, "I like cheese."
-
-Example: say i like cheese! :)
-Output:  You smile and exclaim, "I like cheese!"
-
-You can also specify a prefix in parentheses after the say command.
-
-Example: say (in trepidation) are you going to take my cheese?
-Output:  In trepidation, you ask, "Are you going to take my cheese?"
-
-See also: WHISPER, SAYTO
diff --git a/lib/aethyr/core/help/sayto.help b/lib/aethyr/core/help/sayto.help
deleted file mode 100644
index 8157465c4c985ee2ccaa69c0aaebdbf1ac41889a..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/help/sayto.help
+++ /dev/null
@@ -1,16 +0,0 @@
-Command: Say to
-Syntax: SAYTO <name> <message>
-
-Say something to someone in particular, who is in the same room:
-
-Example:
-
-sayto bob i like cheese
-
-Output:
-
-You say to Bob, "I like cheese."
-
-Also supports the same variations as the SAY command.
-
-See also: WHISPER, SAY
diff --git a/lib/aethyr/core/help/syntax.rb b/lib/aethyr/core/help/syntax.rb
index 2034f2c71ff6aa6b3f4c4a9c6e9d1a721042b65a..bbf0ce1a77544cc7dbe135c87fc71e1e0abd6332 100644
--- a/lib/aethyr/core/help/syntax.rb
+++ b/lib/aethyr/core/help/syntax.rb
@@ -67,23 +67,23 @@ AREACT [RELOAD|CLEAR] [OBJECT]",
 TERRAIN HERE TYPE [TYPE]
 TERRAIN HERE (INDOORS|WATER|UNDERWATER) (YES|NO)",
 "bug" =>
-"BUG <issue>
+"BUG [issue]
 BUG <id number>
 BUG LIST
 BUG STATUS <id_number> <status>
 BUG [SHOW|ADD|DEL] <id_number>",
 "idea" =>
-"IDEA <issue>
+"IDEA [issue]
 IDEA <id number>
 IDEA LIST
 IDEA STATUS <id_number> <status>
 IDEA [SHOW|ADD|DEL] <id_number>",
 "typo" =>
-"TYPO <issue>
-TYPO <id number>
+"TYPO [issue]
+TYPO [id number]
 TYPO LIST
-TYPO STATUS <id_number> <status>
-TYPO [SHOW|ADD|DEL] <id_number>",
+TYPO STATUS [id_number] [status]
+TYPO [SHOW|ADD|DEL] [id_number]",
 "climb" =>
 "What would you like to climb?",
 "close" =>
diff --git a/lib/aethyr/core/help/tell.help b/lib/aethyr/core/help/tell.help
deleted file mode 100644
index 8eb5665a31901e78deb18fdf264e43cdb69a4e3c..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/help/tell.help
+++ /dev/null
@@ -1,10 +0,0 @@
-Command: Tell
-Syntax: TELL <player> <message>
-
-All inhabitants of Aethyr have the ability to communicate privately with each other over long distances. This is done through the TELL command. Those who investigate these kinds of things claim there is some kind of latent telepathy in all of us. However, while no one knows for certain how it works, everyone knows it does.
-
-Example:
-TELL Justin Hey, how's it going?
-
-
-See also: SAY, SAYTO, WHISPER, REPLY
diff --git a/lib/aethyr/core/help/whisper.help b/lib/aethyr/core/help/whisper.help
deleted file mode 100644
index fa4806a235570de109a06fff2e2a896e77802f57..0000000000000000000000000000000000000000
--- a/lib/aethyr/core/help/whisper.help
+++ /dev/null
@@ -1,15 +0,0 @@
-Command: Whisper
-Syntax: WHISPER <person> <message>
-
-To communicate with someone in the same room, but privately, use this command.
-
-Example:
-
-whisper justin that dog needs a bath
-
-Output:
-
-You whisper to Justin, "That dog needs a bath."
-
-
-See also: SAY
diff --git a/lib/aethyr/core/objects/area.rb b/lib/aethyr/core/objects/area.rb
index 5cf6e45cc0583ff4756ec7f4c4000534105c1370..b1620479648c0fbfac40eea04d54425b33a2ede7 100644
--- a/lib/aethyr/core/objects/area.rb
+++ b/lib/aethyr/core/objects/area.rb
@@ -10,17 +10,17 @@ require 'aethyr/core/objects/traits/location'
 # info.terrain.area_type = :urban
 class Area < GridContainer
   include Location
-  
+
   attr_accessor :map_type
 
   def initialize(*args)
     super
-    
+
     @article = "an"
     @generic = "area"
     @map_type = :rooms
   end
-  
+
   def render_map(player, position, map_rows = 10, map_columns = 10)
     if @map_type == :rooms
       return render_rooms(player, position, map_rows, map_columns)
@@ -32,7 +32,7 @@ class Area < GridContainer
       raise "Invalid map type for area!"
     end
   end
-  
+
   private
   def render_world(player, position, map_rows, map_columns)
     player_room = self.inventory.find_by_id(player.container)
@@ -44,7 +44,7 @@ class Area < GridContainer
       (0..width).step(1) do |screen_column|
         column = screen_column + (position[0] - (map_columns / 2))
         room = self.find_by_position([column , row])
-        
+
         if room.nil?
           rendered += " "
         elsif room.eql? player_room
@@ -57,7 +57,7 @@ class Area < GridContainer
     end
     rendered
   end
-  
+
   def render_rooms(player, position, map_rows, map_columns)
     player_room = self.inventory.find_by_id(player.container)
     return "The current location doesn't appear on any maps." if position.nil?
@@ -72,7 +72,7 @@ class Area < GridContainer
       until column >= width
         border_column = (column % 4 == 0);
         room_column = (column / 4) + (position[0] - (map_rows / 2))
-        
+
         room = self.find_by_position([room_column, room_row])
         here_room = (room != nil && row < height - 1 && column < width - 1)
         west = self.find_by_position([room_column - 1, room_row])
@@ -80,7 +80,7 @@ class Area < GridContainer
         north =  self.find_by_position([room_column , room_row + 1 ])
         north_room = (column >= width - 1 ? false : north != nil)
         north_west_room = (row >= height - 1 || column >= width - 1 ? false : self.find_by_position([room_column - 1, room_row + 1]) != nil)
-        
+
         if border_row
           if border_column
             if (here_room and north_west_room) or (west_room and north_room)
@@ -157,15 +157,15 @@ class Area < GridContainer
             column += 2
           end
         end
-        
+
         column += 1
       end
       rendered += "\r\n"
     end
-    
+
     rendered
   end
-  
+
   def room_has_nonstandard_exits(room)
     exits = room.exits.map() { |e| e.alt_names[0] }
     exits.each do |exit|
@@ -173,21 +173,21 @@ class Area < GridContainer
     end
     false
   end
-  
+
   def render_room(room, player)
     return "   " if room.nil?
     player_room = self.inventory.find_by_id(player.container)
     has_player = (player_room.eql? room)
-    
+
     me_here = has_player
     other_player_here = (!room.players(true, player).nil?) && (room.players(true, player).length > 0)
     merchants_here = false
     zone_change_here = room_has_nonstandard_exits(room)
-    
+
     up_here = room.exits.map{ |e| e.alt_names[0]}.include?("up")
     down_here = room.exits.map{ |e| e.alt_names[0]}.include?("down")
     mobs_here = (!room.mobs.nil?) && (room.mobs.length > 0)
-    
+
     left_char = " "
     if zone_change_here
       left_char = "<exit>☼</exit>"
@@ -196,7 +196,7 @@ class Area < GridContainer
     elsif down_here
       left_char = "<exit>↓</exit>"
     end
-    
+
     right_char = " "
     if mobs_here
       right_char = "<mob>*</mob>"
@@ -205,12 +205,12 @@ class Area < GridContainer
     elsif other_player_here
       right_char = "<player>☺</player>"
     end
-    
+
     middle_char = " "
     if me_here
       middle_char = "<me>☺</me>"
     end
-    
+
     if (left_char.eql? " ") and (not right_char.eql? " ")
       if mobs_here and merchants_here
         left_char = "<merchant>☻</merchant>"
@@ -222,7 +222,7 @@ class Area < GridContainer
         right_char = "<exit>↓</exit>"
       end
     end
-    
+
     left_char + middle_char + right_char
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/objects/equipment.rb b/lib/aethyr/core/objects/equipment.rb
index 4d97c5cf8c51dd405e27b966903986aee903d164..9273ff4926361dc71954da9d7d7fb768fe8b6df9 100644
--- a/lib/aethyr/core/objects/equipment.rb
+++ b/lib/aethyr/core/objects/equipment.rb
@@ -7,29 +7,28 @@ class Equipment
   include HasInventory
 
   @@slots = [
+    :left_shoulder,
+    :head,
+    :right_shoulder,
     :left_arm,
+    :torso,
     :right_arm,
-    :head,
+    :left_foot,
+    :legs,
+    :right_foot,
+    :left_hand,
+    :right_hand,
     :face,
     :neck,
     :left_wrist,
     :right_wrist,
     :waist,
-    :left_foot,
-    :right_foot,
-    :left_hand,
-    :right_hand,
     :left_ring_finger,
     :right_ring_finger,
     :left_ear,
     :right_ear,
     :left_ankle,
     :right_ankle,
-    :torso,
-    :arms,
-    :legs,
-    :feet,
-    :hands
     ]
 
   attr_reader :equipment
@@ -203,7 +202,7 @@ class Equipment
     position ||= game_object.position
     position = sym(position)
 
-    if [:arm, :leg, :wield, :wrist, :foot, :ankle, :ring_finger, :ear, :hand].include? position
+    if [:arm, :wield, :wrist, :foot, :ankle, :ring_finger, :ear, :hand, :shoulder].include? position
       return position_of(game_object, "left_#{position}".to_sym) || position_of(game_object, "right_#{position}".to_sym)
     end
 
diff --git a/lib/aethyr/core/objects/game_object.rb b/lib/aethyr/core/objects/game_object.rb
index 96201b831d41984e7da517cc5b3504720755d5c9..dfc680e958576180c41727a2d4473df652b9bbc1 100644
--- a/lib/aethyr/core/objects/game_object.rb
+++ b/lib/aethyr/core/objects/game_object.rb
@@ -70,11 +70,11 @@ class GameObject < Publisher
     @actions = Set.new
     @admin = false
   end
-  
+
   def flags
     Hash.new @info.flags
   end
-  
+
   def add_flag(new_flag)
     new_flag.negate_flags(@info.flags)
     @info.flags[new_flag.id] = new_flag
@@ -97,11 +97,14 @@ class GameObject < Publisher
   def update
     return if @busy
     @busy = true
-    if self.is_a? Reacts
-      self.alert(Event.new(:Generic, :action => :tick))
+    begin
+      if self.is_a? Reacts
+        self.alert(Event.new(:Generic, :action => :tick))
+      end
+      run
+    ensure
+      @busy = false
     end
-    run
-    @busy = false
   end
 
   #Checks if the GameObject is busy in the GameObject#update method.
@@ -263,4 +266,3 @@ class GameObject < Publisher
   end
 
 end
-
diff --git a/lib/aethyr/core/objects/player.rb b/lib/aethyr/core/objects/player.rb
index de2a06d074be9d28ca49d50206a2c91814dea5b9..b36f9719df2db4620056c648e7491917e71051dc 100644
--- a/lib/aethyr/core/objects/player.rb
+++ b/lib/aethyr/core/objects/player.rb
@@ -40,8 +40,8 @@ class Player < LivingObject
 
   }
 
-  attr_reader :admin
-  attr_accessor :color_settings, :use_color, :reply_to, :page_height
+  attr_reader :admin, :color_settings
+  attr_accessor :use_color, :reply_to, :page_height, :layout
 
   #Create a new player object with the given socket connection. You must also pass in a game_object_id and a room, although if you pass in nil for game_object_id it will auto-generate one for you.
   def initialize(connection, game_object_id, room, *args)
@@ -58,6 +58,9 @@ class Player < LivingObject
     @blind = false
     @reply_to = nil
     @prompt_shown = false
+    @layout = :basic
+    @player.display.layout(layout: @layout, in_combat: info.in_combat)
+
     info.stats.satiety = 120
     map_skill = Aethyr::Extensions::Skills::Map.new(self.game_object_id)
     kick_skill = Aethyr::Extensions::Skills::Kick.new(self.game_object_id)
@@ -66,6 +69,11 @@ class Player < LivingObject
     map_skill.add_xp 750
   end
 
+  def color_settings= new_color_settings
+    @color_settings = new_color_settings
+    @player.display.color_settings = @color_settings
+  end
+
   #Searches inventory and equipment for item.
   def has? item
     inventory.find(item) || equipment.find(item)
@@ -139,14 +147,14 @@ class Player < LivingObject
   end
 
   #Outputs a message to the Player. Used for all communication to Player.
-  def output(message, message_type: :main)
+  def output(message, no_newline = false, message_type: :main)
     return if message.nil?
     begin
       if message.is_a? Array
         message = message.join("\r\n")
       end
 
-      @player.say(message, message_type: message_type) unless (@player.nil? or @player.closed?)
+      @player.say(message, no_newline, message_type: message_type) unless (@player.nil? or @player.closed?)
     rescue Exception => e
       log "Unable to send message to #{@name}"
       log e.inspect
@@ -176,9 +184,10 @@ class Player < LivingObject
     end
 
     clean_input = input.downcase.strip
-    self.output('Help topics available:') if (clean_input.eql? "help") or (clean_input.eql? "help topics")
+    self.output("Help topics available: ", false) if (clean_input.eql? "help") or (clean_input.eql? "help topics")
     broadcast(:player_input, {:publisher => self, :input => input})
     event = CommandParser.parse(self, input)
+    self.output(" ", false) if (clean_input.eql? "help") or (clean_input.eql? "help topics")
 
     if event.nil?
       if input
@@ -244,6 +253,10 @@ class Player < LivingObject
     super
   end
 
+  def update_display
+    @player.display.refresh_watch_windows(self)
+  end
+
   def run
     super
     if info.stats.health < info.stats.max_health - 10
@@ -251,5 +264,6 @@ class Player < LivingObject
     elsif info.stats.health < info.stats.max_health
       info.stats.health = info.stats.max_health
     end
+    update_display
   end
 end
diff --git a/lib/aethyr/core/objects/room.rb b/lib/aethyr/core/objects/room.rb
index e49b6ebcb496c4153e4417658aa70fdfe745cbe8..ac01b2102c48327cd1053f5f891057740c2eb5c5 100644
--- a/lib/aethyr/core/objects/room.rb
+++ b/lib/aethyr/core/objects/room.rb
@@ -14,13 +14,13 @@ require 'aethyr/core/objects/traits/location'
 # terrain.room_type (Symbol)
 class Room < Container
   include Location
-  
+
   attr_reader :terrain
 
   #Create new room. Arguments same as GameObject.
   def initialize(*args)
     super(nil, *args)
-    
+
     @generic = "room"
   end
 
@@ -36,8 +36,7 @@ class Room < Container
     object.container = @game_object_id
 
     if object.is_a? Player or object.is_a? Mobile
-      object.output(self.look(object), message_type: :look) unless object.blind?
-      object.output(self.area.render_map(object, self.area.position(self)), message_type: :map) if object.is_a? Player
+      object.update_display
     end
   end
 
@@ -51,7 +50,7 @@ class Room < Container
   def exits
     @inventory.find_all('class', Exit)
   end
-  
+
   def players(only_visible = true, exclude = nil)
     players = Array.new
     @inventory.each do |item|
@@ -59,7 +58,7 @@ class Room < Container
     end
     players
   end
-  
+
   def mobs(only_visible = true)
     mobs = Array.new
     @inventory.each do |item|
@@ -67,7 +66,7 @@ class Room < Container
     end
     mobs
   end
-  
+
   def things(only_visible = true)
     things = Array.new
     @inventory.each do |item|
@@ -75,7 +74,7 @@ class Room < Container
     end
     things
   end
-  
+
   def exits(only_visible = true)
     exits = Array.new
     @inventory.each do |item|
@@ -121,7 +120,7 @@ class Room < Container
         else
           quantity = item.article
         end
-        
+
         idents = ["<identifier>#{item.generic}</identifier>"]
         idents += item.alt_names.map() {|e| "<identifier>" + e + "</identifier>"}
         idents = idents.join(', ')
@@ -147,7 +146,7 @@ class Room < Container
     else
       players = "The following #{players.length <= 1 ? 'player is' : 'players are'} here:\n#{players.list(@inventory, :expanded)}\n"
     end
-    
+
     if mobs.empty?
       mobs = ""
     else
@@ -159,7 +158,7 @@ class Room < Container
     else
       things = "There are the following items in the room:\n#{things.list(@inventory, :expanded)}\n"
     end
-    
+
     info = "You find some things unusual about this place:\n"
     info += "  Type: " + self.terrain_type.name + "\n"
     self.flags.values.each do |f|
@@ -172,4 +171,3 @@ class Room < Container
     "\n<roomtitle>#{@name}</roomtitle>\n\n#{(@short_desc || '') + add_to_desc}\n\n[Exits: #{exits.list}]\n\n#{info}#{players}#{mobs}#{things}\n"
   end
 end
-
diff --git a/lib/aethyr/core/render/display.rb b/lib/aethyr/core/render/display.rb
index 4d6c4fa77d7476d783e2f3610843d8cee7070d2b..127cdb664002b67c7e7f7a8b5c63cd378a6fd807 100644
--- a/lib/aethyr/core/render/display.rb
+++ b/lib/aethyr/core/render/display.rb
@@ -1,172 +1,171 @@
 require "ncursesw"
+require 'stringio'
 require 'aethyr/core/connection/telnet_codes'
+require 'aethyr/core/connection/telnet'
+require 'aethyr/core/components/manager'
+require 'aethyr/core/render/window'
 
 class Display
-  PREAMBLE = [IAC + DO + OPT_LINEMODE, 
-              IAC + SB + OPT_LINEMODE + OPT_ECHO + OPT_BINARY + IAC + SE,
-              IAC + WILL + OPT_ECHO]
-            
-  DEFAULT_HEIGHT = 130
-  DEFAULT_WIDTH = 164
-  
-  def initialize socket
+  attr_reader :layout_type
+  attr_accessor :color_settings, :use_color
+
+  DEFAULT_HEIGHT = 43
+  DEFAULT_WIDTH = 80
+
+  def initialize(socket, new_color_settings = nil)
     @height = DEFAULT_HEIGHT
     @width = DEFAULT_WIDTH
-    
-    @socket = socket
-    PREAMBLE.each do |line|
-      @socket.puts line
-    end
-    
-    @selected = :input
+    @use_color = false
+    @layout_type = :basic
+
+    @color_settings = new_color_settings || to_default_colors
+
+    @socket = socket #StringIO.new
+    @scanner = TelnetScanner.new(socket, self)
+    @scanner.send_preamble
+
     @screen = Ncurses.newterm("xterm-256color", @socket, @socket)
-    
+
     Ncurses.set_term(@screen)
     Ncurses.resizeterm(@height, @width)
     Ncurses.cbreak           # provide unbuffered input
     Ncurses.noecho           # turn off input echoing
     Ncurses.nonl             # turn off newline translation
+    Ncurses.curs_set(2) #high visibility cursor
 
     Ncurses.stdscr.intrflush(false) # turn off flush-on-interrupt
     Ncurses.stdscr.keypad(true)     # turn on keypad mode
-    
-    Ncurses.scrollok(Ncurses.stdscr, true)
+
     Ncurses.stdscr.clear
-    
-    init_colors
+
+    @windows = {
+      :main => Window.new(@color_settings, buffered: true),
+      :input => Window.new(@color_settings),
+      :map => Window.new(@color_settings),
+      :look => Window.new(@color_settings),
+      :fight_enemy => Window.new(@color_settings),
+      :fight_team => Window.new(@color_settings),
+      :fight_queue => Window.new(@color_settings, buffered: true)
+    }
+    self.selected = :input
     layout
   end
-  
+
   def init_colors
     Ncurses.start_color
+    @use_color = true
+    @windows.each do |channel, window|
+      window.enable_color
+    end
+    puts "There are #{Ncurses.COLORS} colors on this client"
+    Ncurses.assume_default_colors(Color::Foreground.attribute(:white), Color::Background.attribute(:black));
     Ncurses.COLORS.times do |fg|
       Ncurses.COLORS.times do |bg|
-        Ncurses.init_pair(fg + bg * Ncurses.COLORS, bg, fg)
+        Ncurses.init_pair(fg + bg * Ncurses.COLORS, fg, bg)
       end
     end
+    update
+  end
+
+  def selected= channel
+    @windows.each do |channel, window|
+      window.selected = false
+    end
+    @windows[channel].selected = true
   end
-  
-  def activate_color(window, fg, bg)
-    window.attron(fg + bg * Ncurses.COLORS)
+
+  def selected
+    @windows.each do |channel, window|
+      return channel if window.selected
+    end
   end
-  
-  def layout( layout_type: :full)
-    case layout_type
-    when :basic
-      @window_main_border = Ncurses::WINDOW.new(@height - 3, 0, 0, 0)
-      @window_main = @window_main_border.derwin(@window_main_border.getmaxy - 2, @window_main_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_main, true)
-      @window_main.clear
-      #@window_main.move(@window_main.getmaxy - 2,1)
-
-      @window_input_border = Ncurses::WINDOW.new(3, 0, @height - 3, 0)
-      @window_input = @window_input_border.derwin(@window_input_border.getmaxy - 2, @window_input_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_input, false)
-      @window_input.clear
-    when :full
-      @window_map_border = Ncurses::WINDOW.new(@height - 29, 0, 0, 0)
-      @window_map = @window_map_border.derwin(@window_map_border.getmaxy - 2, @window_map_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_map, true)
-      @window_map.clear
-      @window_map.move(@window_map.getmaxy - 2,1)
-      
-      @window_look_border = Ncurses::WINDOW.new(26, 82, @height - 29, 0)
-      @window_look = @window_look_border.derwin(@window_look_border.getmaxy - 2, @window_look_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_look, true)
-      @window_look.clear
-      @window_look.move(@window_look.getmaxy - 2,1)
-      
-      @window_main_border = Ncurses::WINDOW.new(26, 0, @height - 29, 82)
-      @window_main = @window_main_border.derwin(@window_main_border.getmaxy - 2, @window_main_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_main, true)
-      @window_main.clear
-      #@window_main.move(@window_main.getmaxy - 2,1)
-
-      @window_input_border = Ncurses::WINDOW.new(3, 0, @height - 3, 0)
-      @window_input = @window_input_border.derwin(@window_input_border.getmaxy - 2, @window_input_border.getmaxx - 2, 1, 1)
-      Ncurses.scrollok(@window_input, false)
-      @window_input.clear
+
+  def layout(layout: @layout_type, in_combat: false)
+    @layout_type = layout
+    if @layout_type == :full && @height > 100 && @width > 165
+      unless in_combat
+        @windows[:fight_enemy].destroy
+        @windows[:fight_team].destroy
+        @windows[:fight_queue].destroy
+        @windows[:map].create(height: @height/2)
+        @windows[:look].create(height: @height/2 - 3, width: 83, y: @height/2)
+        @windows[:main].create(height: @height/2 - 3, x: 83, y: @height/2)
+        @windows[:input].create(height: 3, y: @height - 3)
+      else
+        @windows[:map].destroy
+        @windows[:look].destroy
+        @windows[:fight_enemy].create(height: @height/3 - 1, width: @width - 83)
+        @windows[:fight_team].create(height: @height/3 - 1, width: @width - 83, y: @height/3)
+        @windows[:fight_queue].create(height: @height - 3, width: 83, x: @width - 83)
+        @windows[:main].create(height: @height/3 - 1, width: @width - 83, y: @height/2)
+        @windows[:input].create(height: 3, y: @height - 3)
+      end
+    else
+      @windows[:fight_enemy].destroy
+      @windows[:fight_team].destroy
+      @windows[:fight_queue].destroy
+      @windows[:map].destroy
+      @windows[:look].destroy
+      @windows[:main].create(height: @height - 2)
+      @windows[:input].create(height: 3, y: @height - 3)
     end
 
     @echo = true
     update
   end
-  
+
+  def resolution
+    [@width, @height]
+  end
+
+  def resolution=(resolution)
+    @width = resolution[0]
+    @height = resolution[1]
+    Ncurses.resizeterm(@height, @width)
+    layout
+  end
+
   def read_rdy?
     ready, _, _ = IO.select([@socket])
     ready.any?
   end
-  
+
   def echo?
     @echo
   end
-  
+
   def echo_on
     @echo = true
   end
-  
+
   def echo_off
     @echo = false
   end
-  
+
   def recv
     return nil unless read_rdy?
-    
+
     set_term
     recvd = read_line(0, 0)
 
     puts "read returned: #{recvd}"
     recvd + "\n"
   end
-  
+
   def send_raw message
     @socket.puts message
   end
-  
-  def send (message, message_type: :main, internal_clear: true)
+
+  def send (message, word_wrap = true, message_type: :main, internal_clear: false, add_newline: true)
     window = nil
-    case message_type
-    when :main
-      window = @window_main
-    when :look
-      unless @window_look.nil?
-        window = @window_look
-        #window.clear
-      else
-        window = @window_main
-      end
-    when :map
-      unless @window_map.nil?
-        window = @window_map
-        #window.clear
-      else
-        window = @window_main
-      end
-    end
-    raise "window_type not recognized" if window.nil?
-    
-    window.clear if internal_clear and not message_type.eql? :main
-    
-    message = message.tr("\r", '')
-    lines = message.split("\n");
-    return if lines.empty?
-    if lines.length > 1
-      lines.each do |line|
-        send line, message_type: message_type, internal_clear: false
-      end
-      return
-    end
-    message = lines[0]
-    
-    set_term
 
-    #window.scroll
-    #window.mvaddstr(window.getmaxy - 2, 1, "#{message}\n")
-    activate_color(window, 2, 0)
-    window.addstr("#{message}\n")
-    update
+    raise "window_type not recognized" if @windows[message_type].nil?
+
+    @windows[message_type].clear if internal_clear
+    @windows[message_type].send(message, word_wrap, add_newline: add_newline)
+
   end
-  
+
   def close
     set_term
     Ncurses.echo
@@ -174,103 +173,278 @@ class Display
     Ncurses.nl
     Ncurses.endwin
   end
-  
+
+  #Sets colors to defaults
+  def to_default_colors
+    @color_settings = {
+      "roomtitle" => "fg:green bold",
+      "object" => "fg:blue",
+      "player" => "fg:cyan",
+      "mob" => "fg:yellow bold",
+      "merchant" => "fg:yellow dim",
+      "me" => "fg:white bold",
+      "exit" => "fg:green",
+      "say" => "fg:white bold",
+      "tell" => "fg:cyan bold",
+      "important" => "fg:red bold",
+      "editor" => "fg:cyan",
+      "news" => "fg:cyan bold",
+      "identifier" => "fg:magenta bold",
+      "water" => "fg:blue",
+      "waterlow" => "fg:blue dim",
+      "waterhigh" => "fg:blue bold",
+      "earth" => "fg:darkgoldenrod",
+      "earthlow" => "fg:darkgoldenrod dim",
+      "earthhigh" => "fg:darkgoldenrod bold",
+      "air" => "fg:white",
+      "airlow" => "fg:white dim",
+      "airhigh" => "fg:white bold",
+      "fire" => "fg:red",
+      "firelow" => "fg:red dim",
+      "firehigh" => "fg:red bold",
+      "regular" => "fg:white bg:black"
+    }
+  end
+
+  #Sets the foreground color for a given setting.
+  def set_color(code, color)
+    code.downcase! unless code.nil?
+    color.downcase! unless color.nil?
+
+    if not @color_settings.has_key? code
+      "No such setting: #{code}"
+    else
+      if not @use_color
+        @color_settings.keys.each do |setting|
+          @color_settings[setting] = ""
+        end
+        @use_color = true
+      end
+
+      @color_settings[code] = color
+      "Set #{code} to <#{code}>#{color}</#{code}>."
+    end
+  end
+
+  #Returns list of color settings to show the player
+  def show_color_config
+  <<-CONF
+Colors are currently: #{@use_color ? "Enabled" : "Disabled"}
+Text                Setting          Color
+-----------------------------------------------
+Room Title          roomtitle        <roomtitle>#{@color_settings['roomtitle']}</roomtitle>
+Object              object           <object>#{@color_settings['object']}</object>
+Player              player           <player>#{@color_settings['player']}</player>
+Mob                 mob              <mob>#{@color_settings['mob']}</mob>
+Merchant            merchant         <merchant>#{@color_settings['merchant']}</merchant>
+Me                  me               <me>#{@color_settings['me']}</me>
+Exit                exit             <exit>#{@color_settings['exit']}</exit>
+Say                 say              <say>#{@color_settings['say']}</say>
+Tell                tell             <tell>#{@color_settings['tell']}</tell>
+Important           important        <important>#{@color_settings['important']}</important>
+Editor              editor           <editor>#{@color_settings['editor']}</editor>
+News                news             <news>#{@color_settings['news']}</news>
+Identifier          identifier       <identifier>#{@color_settings['identifier']}</identifier>
+Fire                fire             <fire>#{@color_settings['fire']}</fire>
+Fire when low       firelow          <firelow>#{@color_settings['firelow']}</firelow>
+Fire when high      firehigh         <firehigh>#{@color_settings['firehigh']}</firehigh>
+Air                 air              <air>#{@color_settings['air']}</air>
+Air when low        airlow           <airlow>#{@color_settings['airlow']}</airlow>
+Air when high       airhigh          <airhigh>#{@color_settings['airhigh']}</airhigh>
+Water               water            <water>#{@color_settings['water']}</water>
+Water when low      waterlow         <waterlow>#{@color_settings['waterlow']}</waterlow>
+Water when high     waterhigh        <waterhigh>#{@color_settings['waterhigh']}</waterhigh>
+Earth               earth            <earth>#{@color_settings['earth']}</earth>
+Earth when low      earthlow         <earthlow>#{@color_settings['earthlow']}</earthlow>
+Earth when high     earthhigh        <earthhigh>#{@color_settings['earthhigh']}</earthhigh>
+Regular             regular          #{@color_settings['regular']}
+CONF
+  end
+
+  def refresh_watch_windows(player)
+    if @windows[:look].exists?
+      if player.blind?
+        send( "You cannot see while you are blind.", message_type: :look, internal_clear: true)
+      else
+        room = $manager.get_object(player.container)
+        if not room.nil?
+          look_text = room.look(player)
+          cleared = false
+          Window.split_message(look_text, 79).each do |msg|
+            send(msg, message_type: :look, internal_clear: !cleared, add_newline: true)
+            cleared = true
+          end
+        else
+          send("Nothing to look at.", message_type: :look, internal_clear: true)
+        end
+      end
+    end
+
+    if @windows[:map].exists?
+      room = $manager.get_object(player.container)
+      if not room.nil?
+        send(room.area.render_map(player, room.area.position(room)), message_type: :map, internal_clear: true)
+      else
+        send("No map of current area.", message_type: :map, internal_clear: true)
+      end
+    end
+  end
+
   private
-  
+
   def update
-    @window_main_border.border(*([32]*8)) unless @window_main_border.nil?
-    @window_input_border.border(*([32]*8)) unless @window_input_border.nil?
-    @window_map_border.border(*([32]*8)) unless @window_map_border.nil?
-    @window_look_border.border(*([32]*8)) unless @window_look_border.nil?
-    
-    @window_main_border.border(*([0]*8)) if @selected.eql? :main
-    @window_input_border.border(*([0]*8)) if @selected.eql? :input
-    @window_map_border.border(*([0]*8)) if @selected.eql? :map
-    @window_look_border.border(*([0]*8)) if @selected.eql? :look
-    
-    @window_main_border.noutrefresh()
-    @window_main.noutrefresh()
-    @window_input_border.noutrefresh()
-    @window_input.noutrefresh()
-    @window_map_border.noutrefresh()
-    @window_map.noutrefresh()
-    @window_look_border.noutrefresh()
-    @window_look.noutrefresh()
+    @windows.each do |channel, window|
+      window.update unless channel == :input
+    end
+    @windows[:input].update #make sure input always takes the cursor
     Ncurses.doupdate()
   end
-  
+
   def set_term
     Ncurses.set_term(@screen)
   end
-  
+
 
   def read_line(y, x,
-                window     = @window_input,
-                max_len    = (window.getmaxx - x - 1),
-                string     = "",
-                cursor_pos = 0)
+                max_len: (@windows[:input].window_text.getmaxx - x - 1),
+                string: "",
+                cursor_pos: 0)
+    escape = nil
     loop do
-      window.mvaddstr(y,x,string) if echo?
-      window.move(y,x+cursor_pos) if echo?
-      update
-      
-      ch = window.getch
+      @windows[:input].clear
+      @windows[:input].window_text.mvaddstr(y,x,string) if echo?
+      @windows[:input].window_text.move(y,x+cursor_pos) if echo?
+      #update
+      @windows[:input].update
+      Ncurses.doupdate();
+
+      next if not @scanner.process_iac
+      ch = @windows[:input].window_text.getch
       puts ch
-      case ch
-      when Ncurses::KEY_LEFT
-        cursor_pos = [0, cursor_pos-1].max
-      when Ncurses::KEY_RIGHT
-        cursor_pos = [max_len, cursor_pos + 1].min
-        # similar, implement yourself !
-#      when Ncurses::KEY_ENTER, ?\n, ?\r
-#        return string, cursor_pos, ch # Which return key has been used?
-      when 13 # return
-        window.clear
-        @window_main.addstr("≫≫≫≫≫ #{string}\n") if echo?
-        @selected = :input
-        update
-        return string#, cursor_pos, ch # Which return key has been used?
-      #when Ncurses::KEY_BACKSPACE
-      when 127 # backspace
-        string = string[0...([0, cursor_pos-1].max)] + string[cursor_pos..-1]
-        cursor_pos = [0, cursor_pos-1].max
-        window.mvaddstr(y, x+string.length, " ") if echo?
-        @selected = :input
-      # when etc...
-      when 32..255 # remaining printables
-        if (cursor_pos < max_len)
-          #string[cursor_pos,0] = ch
-          string = string + ch.chr
-          cursor_pos += 1
-        end
-        @selected = :input
-      when 9 # tab
-        case @selected
-        when :input
-          @selected = :main
-        when :main
-          if not @window_map.nil?
-            @selected = :map
-          elsif not @window_look.nil?
-            @selected = :look
+
+      unless escape.nil?
+        case escape
+
+        when [27]
+          case ch
+          when 91
+            escape = [27, 91]
+          end
+
+        when [27, 91]
+          case ch
+          when 53 #scroll up
+            escape = [27, 91, 53]
+          when 54 #scroll down
+            escape = [27, 91, 54]
+          when 68
+            ch = Ncurses::KEY_LEFT
+            escape = nil
+          when 67
+            ch = Ncurses::KEY_RIGHT
+            escape = nil
+          when 65
+            ch = Ncurses::KEY_UP
+            escape = nil
+          when 66
+            ch = Ncurses::KEY_DOWN
+            escape = nil
           else
-            @selected = :input
+            escape = nil
+            next
           end
-        when :map
-          if not @window_look.nil?
-            @selected = :look
+
+        when [27, 91, 53]
+          case ch
+          when 126 #page up
+            @windows[:main].buffer_pos += 1
+            escape = nil
+            next
           else
-            @selected = :input
+            escape = nil
+            next
+          end
+
+        when [27, 91, 54]
+          case ch
+          when 126 #page down
+            @windows[:main].buffer_pos -= 1
+            escape = nil
+            next
+          else
+            escape = nil
+            next
           end
-        when :look
-          @selected = :input
         else
+          escape = nil
+          next
+        end
+      end
+
+      if escape.nil?
+        case ch
+        when 27
+          escape = [27]
+        when Ncurses::KEY_LEFT
+          cursor_pos = [0, cursor_pos-1].max
+        when Ncurses::KEY_RIGHT
+          cursor_pos = [max_len, cursor_pos + 1, string.length].min
+        when Ncurses::KEY_UP
+          @windows[:main].buffer_pos += 1
+        when Ncurses::KEY_DOWN
+          @windows[:main].buffer_pos -= 1
+        when 13 # return
+          @windows[:input].clear
+          self.selected = :input
+          @windows[:main].send("≫≫≫≫≫ #{string}") if echo?
+          @windows[:main].buffer_pos = 0
+          @windows[:main].update
+          return string#, cursor_pos, ch # Which return key has been used?
+        #when Ncurses::KEY_BACKSPACE
+        when 127, "\b".ord, Ncurses::KEY_BACKSPACE  # backspace
+          #string = string[0...([0, cursor_pos-1].max)] + string[cursor_pos..-1]
+          if cursor_pos >= 1
+            string.slice!(cursor_pos - 1)
+            cursor_pos = cursor_pos-1
+          end
+#          window.mvaddstr(y, x+string.length, " ") if echo?
+          @selected = :input
+        # when etc...
+        when 32..255 # remaining printables
+          if (cursor_pos < max_len)
+            #string[cursor_pos,0] = ch
+            string.insert(cursor_pos, ch.chr)
+            cursor_pos += 1
+          end
           @selected = :input
+        when 9 # tab
+          case self.selected
+          when :input
+            self.selected = :main
+          when :main
+            if @windows[:map].exists?
+              self.selected = :map
+            elsif @windows[:look].exists?
+              self.selected = :look
+            else
+              self.selected = :input
+            end
+          when :map
+            if @windows[:look].exists?
+              self.selected = :look
+            else
+              self.selected = :input
+            end
+          when :look
+            self.selected = :input
+          else
+            self.selected = :input
+          end
+          update
+        else
+          log "Unidentified key press: #{ch}"
         end
-        update
-      else
-        log "Unidentified key press: #{ch}"
       end
-    end    	
+    end
   end
-end
\ No newline at end of file
+end
diff --git a/lib/aethyr/core/render/editor.rb b/lib/aethyr/core/render/editor.rb
index f808869bbe7466614dc544254bba4fbbbd7a7962..0a0154d2acaeb2314d80d5651263ed52b2c139fe 100644
--- a/lib/aethyr/core/render/editor.rb
+++ b/lib/aethyr/core/render/editor.rb
@@ -116,7 +116,7 @@ module Editor
   #
   #Basically just colors the output.
   def editor_out message
-    self.puts "<editor>#{message}</editor>"
+    self.send_puts "<editor>#{message}</editor>"
   end
 
   #Replace a line in the buffer.
diff --git a/lib/aethyr/core/render/format.rb b/lib/aethyr/core/render/format.rb
index d8abbb0997b296fffea6b3413760b22fe6a074b1..352ceb4aa5ea2d5ea33d85a4d7a503bef22c6522 100644
--- a/lib/aethyr/core/render/format.rb
+++ b/lib/aethyr/core/render/format.rb
@@ -1,360 +1,266 @@
 #ANSI colors.
 module Color
-  module Formatting
-    @@attributes = [
-    [ :bold, "\e[1m"],  
-    [ :dim, "\e[2m"],
-    [ :underlined, "\e[4m"],
-    [ :blink, "\e[5m"],
-    [ :reverse, "\e[7m"]
-    ]
-    
-    @@attributes.each do |c, v|
-      eval %Q{
-        def #{c}(string = nil)
-          result = ''
-          result << "#{v}"
-          if block_given?
-            result << yield
-          elsif string
-            result << string
-          elsif respond_to?(:to_str)
-            result << self
-          else
-            return result #only switch on
-          end
-          result << "\e[0m"
-          result
-        end
-      }
-    end
-    
-    module_function
-    def attributes
-      @@attributes.map { |c| c.first }
-    end
-    
-    def attribute att
-      @@attributes.each do |e|
-        return e.last if e.first.eql? att
-      end
-      nil
-    end
-    extend self
-  end
-  
-  module Reset
-    @@attributes = [
-    [ :all, "\e[0m"],
-    [ :bold, "\e[21m"],  
-    [ :dim, "\e[22m"],
-    [ :underlined, "\e[24m"],
-    [ :blink, "\e[25m"],
-    [ :reverse, "\e[27m"]
-    ]
-    
-    @@attributes.each do |c, v|
-      eval %Q{
-        def #{c}(string = nil)
-          result = ''
-          result << "#{v}"
-          if block_given?
-            result << yield
-          elsif string
-            result << string
-          elsif respond_to?(:to_str)
-            result << self
-          else
-            return result #only switch on
-          end
-          result << "\e[0m"
-          result
-        end
-      }
-    end
-    
-    module_function
-    def attributes
-      @@attributes.map { |c| c.first }
-    end
-    
-    def attribute att
-      @@attributes.each do |e|
-        return e.last if e.first.eql? att
-      end
-      nil
-    end
-    extend self
-  end
-  
+
   module Foreground
     @@attributes = [
-    [ :magenta, "\e[35m"],
-    [ :cyan, "\e[36m"],
-    [ :light_gray, "\e[37m"],
-    [ :dark_gray, "\e[90m"],
-    [ :light_red, "\e[91m"],
-    [ :light_green, "\e[92m"],
-    [ :light_yellow, "\e[93m"],
-    [ :light_blue, "\e[94m"],
-    [ :light_magenta, "\e[95m"],
-    [ :light_cyan, "\e[96m"],
-    [ :black, "\e[38;5;0m"],
-    [ :maroon, "\e[38;5;1m"],
-    [ :green, "\e[38;5;2m"],
-    [ :olive, "\e[38;5;3m"],
-    [ :navy, "\e[38;5;4m"],
-    [ :purple, "\e[38;5;5m"],
-    [ :teal, "\e[38;5;6m"],
-    [ :silver, "\e[38;5;7m"],
-    [ :grey, "\e[38;5;8m"],
-    [ :red, "\e[38;5;9m"],
-    [ :lime, "\e[38;5;10m"],
-    [ :yellow, "\e[38;5;11m"],
-    [ :blue, "\e[38;5;12m"],
-    [ :fuchsia, "\e[38;5;13m"],
-    [ :aqua, "\e[38;5;14m"],
-    [ :white, "\e[38;5;15m"],
-    [ :grey_0, "\e[38;5;16m"],
-    [ :navy_blue, "\e[38;5;17m"],
-    [ :dark_blue, "\e[38;5;18m"],
-    [ :blue_3, "\e[38;5;19m"],
-    [ :blue_3, "\e[38;5;20m"],
-    [ :blue_1, "\e[38;5;21m"],
-    [ :dark_green, "\e[38;5;22m"],
-    [ :deep_sky_blue_4, "\e[38;5;23m"],
-    [ :deep_sky_blue_4, "\e[38;5;24m"],
-    [ :deep_sky_blue_4, "\e[38;5;25m"],
-    [ :dodger_blue_3, "\e[38;5;26m"],
-    [ :dodger_blue_2, "\e[38;5;27m"],
-    [ :green_4, "\e[38;5;28m"],
-    [ :spring_green_4, "\e[38;5;29m"],
-    [ :turquoise_4, "\e[38;5;30m"],
-    [ :deep_sky_blue_3, "\e[38;5;31m"],
-    [ :deep_sky_blue_3, "\e[38;5;32m"],
-    [ :dodger_blue_1, "\e[38;5;33m"],
-    [ :green_3, "\e[38;5;34m"],
-    [ :spring_green_3, "\e[38;5;35m"],
-    [ :dark_cyan, "\e[38;5;36m"],
-    [ :light_sea_green, "\e[38;5;37m"],
-    [ :deep_sky_blue_2, "\e[38;5;38m"],
-    [ :deep_sky_blue_1, "\e[38;5;39m"],
-    [ :green_3, "\e[38;5;40m"],
-    [ :spring_green_3, "\e[38;5;41m"],
-    [ :spring_green_2, "\e[38;5;42m"],
-    [ :cyan_3, "\e[38;5;43m"],
-    [ :dark_turquoise, "\e[38;5;44m"],
-    [ :turquoise_2, "\e[38;5;45m"],
-    [ :green_1, "\e[38;5;46m"],
-    [ :spring_green_2, "\e[38;5;47m"],
-    [ :spring_green_1, "\e[38;5;48m"],
-    [ :medium_spring_green, "\e[38;5;49m"],
-    [ :cyan_2, "\e[38;5;50m"],
-    [ :cyan_1, "\e[38;5;51m"],
-    [ :dark_red, "\e[38;5;52m"],
-    [ :deep_pink_4, "\e[38;5;53m"],
-    [ :purple_4, "\e[38;5;54m"],
-    [ :purple_4, "\e[38;5;55m"],
-    [ :purple_3, "\e[38;5;56m"],
-    [ :blue_violet, "\e[38;5;57m"],
-    [ :orange_4, "\e[38;5;58m"],
-    [ :grey_37, "\e[38;5;59m"],
-    [ :medium_purple_4, "\e[38;5;60m"],
-    [ :slate_blue_3, "\e[38;5;61m"],
-    [ :slate_blue_3, "\e[38;5;62m"],
-    [ :royal_blue_1, "\e[38;5;63m"],
-    [ :chartreuse_4, "\e[38;5;64m"],
-    [ :dark_sea_green_4, "\e[38;5;65m"],
-    [ :pale_turquoise_4, "\e[38;5;66m"],
-    [ :steel_blue, "\e[38;5;67m"],
-    [ :steel_blue_3, "\e[38;5;68m"],
-    [ :cornflower_blue, "\e[38;5;69m"],
-    [ :chartreuse_3, "\e[38;5;70m"],
-    [ :dark_sea_green_4, "\e[38;5;71m"],
-    [ :cadet_blue, "\e[38;5;72m"],
-    [ :cadet_blue, "\e[38;5;73m"],
-    [ :sky_blue_3, "\e[38;5;74m"],
-    [ :steel_blue_1, "\e[38;5;75m"],
-    [ :chartreuse_3, "\e[38;5;76m"],
-    [ :pale_green_3, "\e[38;5;77m"],
-    [ :sea_green_3, "\e[38;5;78m"],
-    [ :aquamarine_3, "\e[38;5;79m"],
-    [ :medium_turquoise, "\e[38;5;80m"],
-    [ :steel_blue_1, "\e[38;5;81m"],
-    [ :chartreuse_2, "\e[38;5;82m"],
-    [ :sea_green_2, "\e[38;5;83m"],
-    [ :sea_green_1, "\e[38;5;84m"],
-    [ :sea_green_1, "\e[38;5;85m"],
-    [ :aquamarine_1, "\e[38;5;86m"],
-    [ :dark_slate_gray_2, "\e[38;5;87m"],
-    [ :dark_red, "\e[38;5;88m"],
-    [ :deep_pink_4, "\e[38;5;89m"],
-    [ :dark_magenta, "\e[38;5;90m"],
-    [ :dark_magenta, "\e[38;5;91m"],
-    [ :dark_violet, "\e[38;5;92m"],
-    [ :purple, "\e[38;5;93m"],
-    [ :orange_4, "\e[38;5;94m"],
-    [ :light_pink_4, "\e[38;5;95m"],
-    [ :plum_4, "\e[38;5;96m"],
-    [ :medium_purple_3, "\e[38;5;97m"],
-    [ :medium_purple_3, "\e[38;5;98m"],
-    [ :slate_blue_1, "\e[38;5;99m"],
-    [ :yellow_4, "\e[38;5;100m"],
-    [ :wheat_4, "\e[38;5;101m"],
-    [ :grey_53, "\e[38;5;102m"],
-    [ :light_slate_grey, "\e[38;5;103m"],
-    [ :medium_purple, "\e[38;5;104m"],
-    [ :light_slate_blue, "\e[38;5;105m"],
-    [ :yellow_4, "\e[38;5;106m"],
-    [ :dark_olive_green_3, "\e[38;5;107m"],
-    [ :dark_sea_green, "\e[38;5;108m"],
-    [ :light_sky_blue_3, "\e[38;5;109m"],
-    [ :light_sky_blue_3, "\e[38;5;110m"],
-    [ :sky_blue_2, "\e[38;5;111m"],
-    [ :chartreuse_2, "\e[38;5;112m"],
-    [ :dark_olive_green_3, "\e[38;5;113m"],
-    [ :pale_green_3, "\e[38;5;114m"],
-    [ :dark_sea_green_3, "\e[38;5;115m"],
-    [ :dark_slate_gray_3, "\e[38;5;116m"],
-    [ :sky_blue_1, "\e[38;5;117m"],
-    [ :chartreuse_1, "\e[38;5;118m"],
-    [ :light_green_1, "\e[38;5;119m"],
-    [ :light_green_2, "\e[38;5;120m"],
-    [ :pale_green_1, "\e[38;5;121m"],
-    [ :aquamarine_1, "\e[38;5;122m"],
-    [ :dark_slate_gray_1, "\e[38;5;123m"],
-    [ :red_3, "\e[38;5;124m"],
-    [ :deep_pink_4, "\e[38;5;125m"],
-    [ :medium_violet_red, "\e[38;5;126m"],
-    [ :magenta_3, "\e[38;5;127m"],
-    [ :dark_violet, "\e[38;5;128m"],
-    [ :purple, "\e[38;5;129m"],
-    [ :dark_orange_3, "\e[38;5;130m"],
-    [ :indian_red, "\e[38;5;131m"],
-    [ :hot_pink_3, "\e[38;5;132m"],
-    [ :medium_orchid_3, "\e[38;5;133m"],
-    [ :medium_orchid, "\e[38;5;134m"],
-    [ :medium_purple_2, "\e[38;5;135m"],
-    [ :dark_goldenrod, "\e[38;5;136m"],
-    [ :light_salmon_3, "\e[38;5;137m"],
-    [ :rosy_brown, "\e[38;5;138m"],
-    [ :grey_63, "\e[38;5;139m"],
-    [ :medium_purple_2, "\e[38;5;140m"],
-    [ :medium_purple_1, "\e[38;5;141m"],
-    [ :gold_3, "\e[38;5;142m"],
-    [ :dark_khaki, "\e[38;5;143m"],
-    [ :navajo_white_3, "\e[38;5;144m"],
-    [ :grey_69, "\e[38;5;145m"],
-    [ :light_steel_blue_3, "\e[38;5;146m"],
-    [ :light_steel_blue, "\e[38;5;147m"],
-    [ :yellow_3, "\e[38;5;148m"],
-    [ :dark_olive_green_3, "\e[38;5;149m"],
-    [ :dark_sea_green_3, "\e[38;5;150m"],
-    [ :dark_sea_green_2, "\e[38;5;151m"],
-    [ :light_cyan_3, "\e[38;5;152m"],
-    [ :light_sky_blue_1, "\e[38;5;153m"],
-    [ :green_yellow, "\e[38;5;154m"],
-    [ :dark_olive_green_2, "\e[38;5;155m"],
-    [ :pale_green_1, "\e[38;5;156m"],
-    [ :dark_sea_green_2, "\e[38;5;157m"],
-    [ :dark_sea_green_1, "\e[38;5;158m"],
-    [ :pale_turquoise_1, "\e[38;5;159m"],
-    [ :red_3, "\e[38;5;160m"],
-    [ :deep_pink_3, "\e[38;5;161m"],
-    [ :deep_pink_3, "\e[38;5;162m"],
-    [ :magenta_3, "\e[38;5;163m"],
-    [ :magenta_3, "\e[38;5;164m"],
-    [ :magenta_2, "\e[38;5;165m"],
-    [ :dark_orange_3, "\e[38;5;166m"],
-    [ :indian_red, "\e[38;5;167m"],
-    [ :hot_pink_3, "\e[38;5;168m"],
-    [ :hot_pink_2, "\e[38;5;169m"],
-    [ :orchid, "\e[38;5;170m"],
-    [ :medium_orchid_1, "\e[38;5;171m"],
-    [ :orange_3, "\e[38;5;172m"],
-    [ :light_salmon_3, "\e[38;5;173m"],
-    [ :light_pink_3, "\e[38;5;174m"],
-    [ :pink_3, "\e[38;5;175m"],
-    [ :plum_3, "\e[38;5;176m"],
-    [ :violet, "\e[38;5;177m"],
-    [ :gold_3, "\e[38;5;178m"],
-    [ :light_goldenrod_3, "\e[38;5;179m"],
-    [ :tan, "\e[38;5;180m"],
-    [ :misty_rose_3, "\e[38;5;181m"],
-    [ :thistle_3, "\e[38;5;182m"],
-    [ :plum_2, "\e[38;5;183m"],
-    [ :yellow_3, "\e[38;5;184m"],
-    [ :khaki_3, "\e[38;5;185m"],
-    [ :light_goldenrod_2, "\e[38;5;186m"],
-    [ :light_yellow_3, "\e[38;5;187m"],
-    [ :grey_84, "\e[38;5;188m"],
-    [ :light_steel_blue_1, "\e[38;5;189m"],
-    [ :yellow_2, "\e[38;5;190m"],
-    [ :dark_olive_green_1, "\e[38;5;191m"],
-    [ :dark_olive_green_1, "\e[38;5;192m"],
-    [ :dark_sea_green_1, "\e[38;5;193m"],
-    [ :honeydew_2, "\e[38;5;194m"],
-    [ :light_cyan_1, "\e[38;5;195m"],
-    [ :red_1, "\e[38;5;196m"],
-    [ :deep_pink_2, "\e[38;5;197m"],
-    [ :deep_pink_1, "\e[38;5;198m"],
-    [ :deep_pink_1, "\e[38;5;199m"],
-    [ :magenta_2, "\e[38;5;200m"],
-    [ :magenta_1, "\e[38;5;201m"],
-    [ :orange_red_1, "\e[38;5;202m"],
-    [ :indian_red_1, "\e[38;5;203m"],
-    [ :indian_red_1, "\e[38;5;204m"],
-    [ :hot_pink, "\e[38;5;205m"],
-    [ :hot_pink, "\e[38;5;206m"],
-    [ :medium_orchid_1, "\e[38;5;207m"],
-    [ :dark_orange, "\e[38;5;208m"],
-    [ :salmon_1, "\e[38;5;209m"],
-    [ :light_coral, "\e[38;5;210m"],
-    [ :pale_violet_red_1, "\e[38;5;211m"],
-    [ :orchid_2, "\e[38;5;212m"],
-    [ :orchid_1, "\e[38;5;213m"],
-    [ :orange_1, "\e[38;5;214m"],
-    [ :sandy_brown, "\e[38;5;215m"],
-    [ :light_salmon_1, "\e[38;5;216m"],
-    [ :light_pink_1, "\e[38;5;217m"],
-    [ :pink_1, "\e[38;5;218m"],
-    [ :plum_1, "\e[38;5;219m"],
-    [ :gold_1, "\e[38;5;220m"],
-    [ :light_goldenrod_2, "\e[38;5;221m"],
-    [ :light_goldenrod_2, "\e[38;5;222m"],
-    [ :navajo_white_1, "\e[38;5;223m"],
-    [ :misty_rose_1, "\e[38;5;224m"],
-    [ :thistle_1, "\e[38;5;225m"],
-    [ :yellow_1, "\e[38;5;226m"],
-    [ :light_goldenrod_1, "\e[38;5;227m"],
-    [ :khaki_1, "\e[38;5;228m"],
-    [ :wheat_1, "\e[38;5;229m"],
-    [ :cornsilk_1, "\e[38;5;230m"],
-    [ :grey_100, "\e[38;5;231m"],
-    [ :grey_3, "\e[38;5;232m"],
-    [ :grey_7, "\e[38;5;233m"],
-    [ :grey_11, "\e[38;5;234m"],
-    [ :grey_15, "\e[38;5;235m"],
-    [ :grey_19, "\e[38;5;236m"],
-    [ :grey_23, "\e[38;5;237m"],
-    [ :grey_27, "\e[38;5;238m"],
-    [ :grey_30, "\e[38;5;239m"],
-    [ :grey_35, "\e[38;5;240m"],
-    [ :grey_39, "\e[38;5;241m"],
-    [ :grey_42, "\e[38;5;242m"],
-    [ :grey_46, "\e[38;5;243m"],
-    [ :grey_50, "\e[38;5;244m"],
-    [ :grey_54, "\e[38;5;245m"],
-    [ :grey_58, "\e[38;5;246m"],
-    [ :grey_62, "\e[38;5;247m"],
-    [ :grey_66, "\e[38;5;248m"],
-    [ :grey_70, "\e[38;5;249m"],
-    [ :grey_74, "\e[38;5;250m"],
-    [ :grey_78, "\e[38;5;251m"],
-    [ :grey_82, "\e[38;5;252m"],
-    [ :grey_85, "\e[38;5;253m"],
-    [ :grey_89, "\e[38;5;254m"],
-    [ :grey_93, "\e[38;5;255m"]
+      [ :grey0, 0],
+      [ :maroon, 1],
+      [ :green, 2],
+      [ :olive, 3],
+      [ :navy, 4],
+      [ :purple, 5],
+      [ :teal, 6],
+      [ :silver, 7],
+      [ :grey, 8],
+      [ :red, 9],
+      [ :lime, 10],
+      [ :yellow, 11],
+      [ :blue, 12],
+      [ :fuchsia, 13],
+      [ :aqua, 14],
+      [ :white, 15],
+      [ :black, 16],
+      [ :navyblue, 17],
+      [ :darkblue, 18],
+      [ :blue3, 19],
+      [ :blue3, 20],
+      [ :blue1, 21],
+      [ :darkgreen, 22],
+      [ :deepskyblue4, 23],
+      [ :deepskyblue4, 24],
+      [ :deepskyblue4, 25],
+      [ :dodgerblue3, 26],
+      [ :dodgerblue2, 27],
+      [ :green4, 28],
+      [ :springgreen4, 29],
+      [ :turquoise4, 30],
+      [ :deepskyblue3, 31],
+      [ :deepskyblue3, 32],
+      [ :dodgerblue1, 33],
+      [ :green3, 34],
+      [ :springgreen3, 35],
+      [ :darkcyan, 36],
+      [ :lightseagreen, 37],
+      [ :deepskyblue2, 38],
+      [ :deepskyblue1, 39],
+      [ :green3, 40],
+      [ :springgreen3, 41],
+      [ :springgreen2, 42],
+      [ :cyan3, 43],
+      [ :darkturquoise, 44],
+      [ :turquoise2, 45],
+      [ :green1, 46],
+      [ :springgreen2, 47],
+      [ :springgreen1, 48],
+      [ :mediumspringgreen, 49],
+      [ :cyan2, 50],
+      [ :cyan1, 51],
+      [ :cyan, 51],
+      [ :darkred, 52],
+      [ :deeppink4, 53],
+      [ :purple4, 54],
+      [ :purple4, 55],
+      [ :purple3, 56],
+      [ :blueviolet, 57],
+      [ :orange4, 58],
+      [ :grey37, 59],
+      [ :mediumpurple4, 60],
+      [ :slateblue3, 61],
+      [ :slateblue3, 62],
+      [ :royalblue1, 63],
+      [ :chartreuse4, 64],
+      [ :darkseagreen4, 65],
+      [ :paleturquoise4, 66],
+      [ :steelblue, 67],
+      [ :steelblue3, 68],
+      [ :cornflowerblue, 69],
+      [ :chartreuse3, 70],
+      [ :darkseagreen4, 71],
+      [ :cadetblue, 72],
+      [ :cadetblue, 73],
+      [ :skyblue3, 74],
+      [ :steelblue1, 75],
+      [ :chartreuse3, 76],
+      [ :palegreen3, 77],
+      [ :seagreen3, 78],
+      [ :aquamarine3, 79],
+      [ :mediumturquoise, 80],
+      [ :steelblue1, 81],
+      [ :chartreuse2, 82],
+      [ :seagreen2, 83],
+      [ :seagreen1, 84],
+      [ :seagreen1, 85],
+      [ :aquamarine1, 86],
+      [ :darkslategray2, 87],
+      [ :darkred, 88],
+      [ :deeppink4, 89],
+      [ :darkmagenta, 90],
+      [ :darkmagenta, 91],
+      [ :darkviolet, 92],
+      [ :purple, 93],
+      [ :orange4, 94],
+      [ :lightpink4, 95],
+      [ :plum4, 96],
+      [ :mediumpurple3, 97],
+      [ :mediumpurple3, 98],
+      [ :slateblue1, 99],
+      [ :yellow4, 100],
+      [ :wheat4, 101],
+      [ :grey53, 102],
+      [ :lightslategrey, 103],
+      [ :mediumpurple, 104],
+      [ :lightslateblue, 105],
+      [ :yellow4, 106],
+      [ :darkolivegreen3, 107],
+      [ :darkseagreen, 108],
+      [ :lightskyblue3, 109],
+      [ :lightskyblue3, 110],
+      [ :skyblue2, 111],
+      [ :chartreuse2, 112],
+      [ :darkolivegreen3, 113],
+      [ :palegreen3, 114],
+      [ :darkseagreen3, 115],
+      [ :darkslategray3, 116],
+      [ :skyblue1, 117],
+      [ :chartreuse1, 118],
+      [ :lightgreen, 119],
+      [ :lightgreen, 120],
+      [ :palegreen1, 121],
+      [ :aquamarine1, 122],
+      [ :darkslategray1, 123],
+      [ :red3, 124],
+      [ :deeppink4, 125],
+      [ :mediumvioletred, 126],
+      [ :magenta3, 127],
+      [ :darkviolet, 128],
+      [ :purple, 129],
+      [ :darkorange3, 130],
+      [ :indianred, 131],
+      [ :hotpink3, 132],
+      [ :mediumorchid3, 133],
+      [ :mediumorchid, 134],
+      [ :mediumpurple2, 135],
+      [ :darkgoldenrod, 136],
+      [ :lightsalmon3, 137],
+      [ :rosybrown, 138],
+      [ :grey63, 139],
+      [ :mediumpurple2, 140],
+      [ :mediumpurple1, 141],
+      [ :gold3, 142],
+      [ :darkkhaki, 143],
+      [ :navajowhite3, 144],
+      [ :grey69, 145],
+      [ :lightsteelblue3, 146],
+      [ :lightsteelblue, 147],
+      [ :yellow3, 148],
+      [ :darkolivegreen3, 149],
+      [ :darkseagreen3, 150],
+      [ :darkseagreen2, 151],
+      [ :lightcyan3, 152],
+      [ :lightskyblue1, 153],
+      [ :greenyellow, 154],
+      [ :darkolivegreen2, 155],
+      [ :palegreen1, 156],
+      [ :darkseagreen2, 157],
+      [ :darkseagreen1, 158],
+      [ :paleturquoise1, 159],
+      [ :red3, 160],
+      [ :deeppink3, 161],
+      [ :deeppink3, 162],
+      [ :magenta3, 163],
+      [ :magenta3, 164],
+      [ :magenta2, 165],
+      [ :darkorange3, 166],
+      [ :indianred, 167],
+      [ :hotpink3, 168],
+      [ :hotpink2, 169],
+      [ :orchid, 170],
+      [ :mediumorchid1, 171],
+      [ :orange3, 172],
+      [ :lightsalmon3, 173],
+      [ :lightpink3, 174],
+      [ :pink3, 175],
+      [ :plum3, 176],
+      [ :violet, 177],
+      [ :gold3, 178],
+      [ :lightgoldenrod3, 179],
+      [ :tan, 180],
+      [ :mistyrose3, 181],
+      [ :thistle3, 182],
+      [ :plum2, 183],
+      [ :yellow3, 184],
+      [ :khaki3, 185],
+      [ :lightgoldenrod2, 186],
+      [ :lightyellow3, 187],
+      [ :grey84, 188],
+      [ :lightsteelblue1, 189],
+      [ :yellow2, 190],
+      [ :darkolivegreen1, 191],
+      [ :darkolivegreen1, 192],
+      [ :darkseagreen1, 193],
+      [ :honeydew2, 194],
+      [ :lightcyan1, 195],
+      [ :red1, 196],
+      [ :deeppink2, 197],
+      [ :deeppink1, 198],
+      [ :deeppink1, 199],
+      [ :magenta2, 200],
+      [ :magenta1, 201],
+      [ :magenta, 201],
+      [ :orangered1, 202],
+      [ :indianred1, 203],
+      [ :indianred1, 204],
+      [ :hotpink, 205],
+      [ :hotpink, 206],
+      [ :mediumorchid1, 207],
+      [ :darkorange, 208],
+      [ :salmon1, 209],
+      [ :lightcoral, 210],
+      [ :palevioletred1, 211],
+      [ :orchid2, 212],
+      [ :orchid1, 213],
+      [ :orange1, 214],
+      [ :sandybrown, 215],
+      [ :lightsalmon1, 216],
+      [ :lightpink1, 217],
+      [ :pink1, 218],
+      [ :plum1, 219],
+      [ :gold1, 220],
+      [ :lightgoldenrod2, 221],
+      [ :lightgoldenrod2, 222],
+      [ :navajowhite1, 223],
+      [ :mistyrose1, 224],
+      [ :thistle1, 225],
+      [ :yellow1, 226],
+      [ :lightgoldenrod1, 227],
+      [ :khaki1, 228],
+      [ :wheat1, 229],
+      [ :cornsilk1, 230],
+      [ :grey100, 231],
+      [ :grey3, 232],
+      [ :grey7, 233],
+      [ :grey11, 234],
+      [ :grey15, 235],
+      [ :grey19, 236],
+      [ :grey23, 237],
+      [ :grey27, 238],
+      [ :grey30, 239],
+      [ :grey35, 240],
+      [ :grey39, 241],
+      [ :grey42, 242],
+      [ :grey46, 243],
+      [ :grey50, 244],
+      [ :grey54, 245],
+      [ :grey58, 246],
+      [ :grey62, 247],
+      [ :grey66, 248],
+      [ :grey70, 249],
+      [ :grey74, 250],
+      [ :grey78, 251],
+      [ :grey82, 252],
+      [ :grey85, 253],
+      [ :grey89, 254],
+      [ :grey93, 255],
     ]
     @@attributes.each do |c, v|
       eval %Q{
@@ -375,12 +281,12 @@ module Color
         end
       }
     end
-    
+
     module_function
     def attributes
       @@attributes.map { |c| c.first }
     end
-    
+
     def attribute att
       @@attributes.each do |e|
         return e.last if e.first.eql? att
@@ -389,277 +295,269 @@ module Color
     end
     extend self
   end
-  
+
   module Background
     @@attributes = [
-    [ :magenta, "\e[45m"],
-    [ :cyan, "\e[46m"],
-    [ :light_gray, "\e[47m"],
-    [ :dark_gray, "\e[100m"],
-    [ :light_red, "\e[101m"],
-    [ :light_green, "\e[102m"],
-    [ :light_yellow, "\e[103m"],
-    [ :light_blue, "\e[104m"],
-    [ :light_magenta, "\e[105m"],
-    [ :light_cyan, "\e[106m"],
-    [ :black, "\e[48;5;0m"],
-    [ :maroon, "\e[48;5;1m"],
-    [ :green, "\e[48;5;2m"],
-    [ :olive, "\e[48;5;3m"],
-    [ :navy, "\e[48;5;4m"],
-    [ :purple, "\e[48;5;5m"],
-    [ :teal, "\e[48;5;6m"],
-    [ :silver, "\e[48;5;7m"],
-    [ :grey, "\e[48;5;8m"],
-    [ :red, "\e[48;5;9m"],
-    [ :lime, "\e[48;5;10m"],
-    [ :yellow, "\e[48;5;11m"],
-    [ :blue, "\e[48;5;12m"],
-    [ :fuchsia, "\e[48;5;13m"],
-    [ :aqua, "\e[48;5;14m"],
-    [ :white, "\e[48;5;15m"],
-    [ :grey_0, "\e[48;5;16m"],
-    [ :navy_blue, "\e[48;5;17m"],
-    [ :dark_blue, "\e[48;5;18m"],
-    [ :blue_3, "\e[48;5;19m"],
-    [ :blue_3, "\e[48;5;20m"],
-    [ :blue_1, "\e[48;5;21m"],
-    [ :dark_green, "\e[48;5;22m"],
-    [ :deep_sky_blue_4, "\e[48;5;23m"],
-    [ :deep_sky_blue_4, "\e[48;5;24m"],
-    [ :deep_sky_blue_4, "\e[48;5;25m"],
-    [ :dodger_blue_3, "\e[48;5;26m"],
-    [ :dodger_blue_2, "\e[48;5;27m"],
-    [ :green_4, "\e[48;5;28m"],
-    [ :spring_green_4, "\e[48;5;29m"],
-    [ :turquoise_4, "\e[48;5;30m"],
-    [ :deep_sky_blue_3, "\e[48;5;31m"],
-    [ :deep_sky_blue_3, "\e[48;5;32m"],
-    [ :dodger_blue_1, "\e[48;5;33m"],
-    [ :green_3, "\e[48;5;34m"],
-    [ :spring_green_3, "\e[48;5;35m"],
-    [ :dark_cyan, "\e[48;5;36m"],
-    [ :light_sea_green, "\e[48;5;37m"],
-    [ :deep_sky_blue_2, "\e[48;5;38m"],
-    [ :deep_sky_blue_1, "\e[48;5;39m"],
-    [ :green_3, "\e[48;5;40m"],
-    [ :spring_green_3, "\e[48;5;41m"],
-    [ :spring_green_2, "\e[48;5;42m"],
-    [ :cyan_3, "\e[48;5;43m"],
-    [ :dark_turquoise, "\e[48;5;44m"],
-    [ :turquoise_2, "\e[48;5;45m"],
-    [ :green_1, "\e[48;5;46m"],
-    [ :spring_green_2, "\e[48;5;47m"],
-    [ :spring_green_1, "\e[48;5;48m"],
-    [ :medium_spring_green, "\e[48;5;49m"],
-    [ :cyan_2, "\e[48;5;50m"],
-    [ :cyan_1, "\e[48;5;51m"],
-    [ :dark_red, "\e[48;5;52m"],
-    [ :deep_pink_4, "\e[48;5;53m"],
-    [ :purple_4, "\e[48;5;54m"],
-    [ :purple_4, "\e[48;5;55m"],
-    [ :purple_3, "\e[48;5;56m"],
-    [ :blue_violet, "\e[48;5;57m"],
-    [ :orange_4, "\e[48;5;58m"],
-    [ :grey_37, "\e[48;5;59m"],
-    [ :medium_purple_4, "\e[48;5;60m"],
-    [ :slate_blue_3, "\e[48;5;61m"],
-    [ :slate_blue_3, "\e[48;5;62m"],
-    [ :royal_blue_1, "\e[48;5;63m"],
-    [ :chartreuse_4, "\e[48;5;64m"],
-    [ :dark_sea_green_4, "\e[48;5;65m"],
-    [ :pale_turquoise_4, "\e[48;5;66m"],
-    [ :steel_blue, "\e[48;5;67m"],
-    [ :steel_blue_3, "\e[48;5;68m"],
-    [ :cornflower_blue, "\e[48;5;69m"],
-    [ :chartreuse_3, "\e[48;5;70m"],
-    [ :dark_sea_green_4, "\e[48;5;71m"],
-    [ :cadet_blue, "\e[48;5;72m"],
-    [ :cadet_blue, "\e[48;5;73m"],
-    [ :sky_blue_3, "\e[48;5;74m"],
-    [ :steel_blue_1, "\e[48;5;75m"],
-    [ :chartreuse_3, "\e[48;5;76m"],
-    [ :pale_green_3, "\e[48;5;77m"],
-    [ :sea_green_3, "\e[48;5;78m"],
-    [ :aquamarine_3, "\e[48;5;79m"],
-    [ :medium_turquoise, "\e[48;5;80m"],
-    [ :steel_blue_1, "\e[48;5;81m"],
-    [ :chartreuse_2, "\e[48;5;82m"],
-    [ :sea_green_2, "\e[48;5;83m"],
-    [ :sea_green_1, "\e[48;5;84m"],
-    [ :sea_green_1, "\e[48;5;85m"],
-    [ :aquamarine_1, "\e[48;5;86m"],
-    [ :dark_slate_gray_2, "\e[48;5;87m"],
-    [ :dark_red, "\e[48;5;88m"],
-    [ :deep_pink_4, "\e[48;5;89m"],
-    [ :dark_magenta, "\e[48;5;90m"],
-    [ :dark_magenta, "\e[48;5;91m"],
-    [ :dark_violet, "\e[48;5;92m"],
-    [ :purple, "\e[48;5;93m"],
-    [ :orange_4, "\e[48;5;94m"],
-    [ :light_pink_4, "\e[48;5;95m"],
-    [ :plum_4, "\e[48;5;96m"],
-    [ :medium_purple_3, "\e[48;5;97m"],
-    [ :medium_purple_3, "\e[48;5;98m"],
-    [ :slate_blue_1, "\e[48;5;99m"],
-    [ :yellow_4, "\e[48;5;100m"],
-    [ :wheat_4, "\e[48;5;101m"],
-    [ :grey_53, "\e[48;5;102m"],
-    [ :light_slate_grey, "\e[48;5;103m"],
-    [ :medium_purple, "\e[48;5;104m"],
-    [ :light_slate_blue, "\e[48;5;105m"],
-    [ :yellow_4, "\e[48;5;106m"],
-    [ :dark_olive_green_3, "\e[48;5;107m"],
-    [ :dark_sea_green, "\e[48;5;108m"],
-    [ :light_sky_blue_3, "\e[48;5;109m"],
-    [ :light_sky_blue_3, "\e[48;5;110m"],
-    [ :sky_blue_2, "\e[48;5;111m"],
-    [ :chartreuse_2, "\e[48;5;112m"],
-    [ :dark_olive_green_3, "\e[48;5;113m"],
-    [ :pale_green_3, "\e[48;5;114m"],
-    [ :dark_sea_green_3, "\e[48;5;115m"],
-    [ :dark_slate_gray_3, "\e[48;5;116m"],
-    [ :sky_blue_1, "\e[48;5;117m"],
-    [ :chartreuse_1, "\e[48;5;118m"],
-    [ :light_green_1, "\e[48;5;119m"],
-    [ :light_green_2, "\e[48;5;120m"],
-    [ :pale_green_1, "\e[48;5;121m"],
-    [ :aquamarine_1, "\e[48;5;122m"],
-    [ :dark_slate_gray_1, "\e[48;5;123m"],
-    [ :red_3, "\e[48;5;124m"],
-    [ :deep_pink_4, "\e[48;5;125m"],
-    [ :medium_violet_red, "\e[48;5;126m"],
-    [ :magenta_3, "\e[48;5;127m"],
-    [ :dark_violet, "\e[48;5;128m"],
-    [ :purple, "\e[48;5;129m"],
-    [ :dark_orange_3, "\e[48;5;130m"],
-    [ :indian_red, "\e[48;5;131m"],
-    [ :hot_pink_3, "\e[48;5;132m"],
-    [ :medium_orchid_3, "\e[48;5;133m"],
-    [ :medium_orchid, "\e[48;5;134m"],
-    [ :medium_purple_2, "\e[48;5;135m"],
-    [ :dark_goldenrod, "\e[48;5;136m"],
-    [ :light_salmon_3, "\e[48;5;137m"],
-    [ :rosy_brown, "\e[48;5;138m"],
-    [ :grey_63, "\e[48;5;139m"],
-    [ :medium_purple_2, "\e[48;5;140m"],
-    [ :medium_purple_1, "\e[48;5;141m"],
-    [ :gold_3, "\e[48;5;142m"],
-    [ :dark_khaki, "\e[48;5;143m"],
-    [ :navajo_white_3, "\e[48;5;144m"],
-    [ :grey_69, "\e[48;5;145m"],
-    [ :light_steel_blue_3, "\e[48;5;146m"],
-    [ :light_steel_blue, "\e[48;5;147m"],
-    [ :yellow_3, "\e[48;5;148m"],
-    [ :dark_olive_green_3, "\e[48;5;149m"],
-    [ :dark_sea_green_3, "\e[48;5;150m"],
-    [ :dark_sea_green_2, "\e[48;5;151m"],
-    [ :light_cyan_3, "\e[48;5;152m"],
-    [ :light_sky_blue_1, "\e[48;5;153m"],
-    [ :green_yellow, "\e[48;5;154m"],
-    [ :dark_olive_green_2, "\e[48;5;155m"],
-    [ :pale_green_1, "\e[48;5;156m"],
-    [ :dark_sea_green_2, "\e[48;5;157m"],
-    [ :dark_sea_green_1, "\e[48;5;158m"],
-    [ :pale_turquoise_1, "\e[48;5;159m"],
-    [ :red_3, "\e[48;5;160m"],
-    [ :deep_pink_3, "\e[48;5;161m"],
-    [ :deep_pink_3, "\e[48;5;162m"],
-    [ :magenta_3, "\e[48;5;163m"],
-    [ :magenta_3, "\e[48;5;164m"],
-    [ :magenta_2, "\e[48;5;165m"],
-    [ :dark_orange_3, "\e[48;5;166m"],
-    [ :indian_red, "\e[48;5;167m"],
-    [ :hot_pink_3, "\e[48;5;168m"],
-    [ :hot_pink_2, "\e[48;5;169m"],
-    [ :orchid, "\e[48;5;170m"],
-    [ :medium_orchid_1, "\e[48;5;171m"],
-    [ :orange_3, "\e[48;5;172m"],
-    [ :light_salmon_3, "\e[48;5;173m"],
-    [ :light_pink_3, "\e[48;5;174m"],
-    [ :pink_3, "\e[48;5;175m"],
-    [ :plum_3, "\e[48;5;176m"],
-    [ :violet, "\e[48;5;177m"],
-    [ :gold_3, "\e[48;5;178m"],
-    [ :light_goldenrod_3, "\e[48;5;179m"],
-    [ :tan, "\e[48;5;180m"],
-    [ :misty_rose_3, "\e[48;5;181m"],
-    [ :thistle_3, "\e[48;5;182m"],
-    [ :plum_2, "\e[48;5;183m"],
-    [ :yellow_3, "\e[48;5;184m"],
-    [ :khaki_3, "\e[48;5;185m"],
-    [ :light_goldenrod_2, "\e[48;5;186m"],
-    [ :light_yellow_3, "\e[48;5;187m"],
-    [ :grey_84, "\e[48;5;188m"],
-    [ :light_steel_blue_1, "\e[48;5;189m"],
-    [ :yellow_2, "\e[48;5;190m"],
-    [ :dark_olive_green_1, "\e[48;5;191m"],
-    [ :dark_olive_green_1, "\e[48;5;192m"],
-    [ :dark_sea_green_1, "\e[48;5;193m"],
-    [ :honeydew_2, "\e[48;5;194m"],
-    [ :light_cyan_1, "\e[48;5;195m"],
-    [ :red_1, "\e[48;5;196m"],
-    [ :deep_pink_2, "\e[48;5;197m"],
-    [ :deep_pink_1, "\e[48;5;198m"],
-    [ :deep_pink_1, "\e[48;5;199m"],
-    [ :magenta_2, "\e[48;5;200m"],
-    [ :magenta_1, "\e[48;5;201m"],
-    [ :orange_red_1, "\e[48;5;202m"],
-    [ :indian_red_1, "\e[48;5;203m"],
-    [ :indian_red_1, "\e[48;5;204m"],
-    [ :hot_pink, "\e[48;5;205m"],
-    [ :hot_pink, "\e[48;5;206m"],
-    [ :medium_orchid_1, "\e[48;5;207m"],
-    [ :dark_orange, "\e[48;5;208m"],
-    [ :salmon_1, "\e[48;5;209m"],
-    [ :light_coral, "\e[48;5;210m"],
-    [ :pale_violet_red_1, "\e[48;5;211m"],
-    [ :orchid_2, "\e[48;5;212m"],
-    [ :orchid_1, "\e[48;5;213m"],
-    [ :orange_1, "\e[48;5;214m"],
-    [ :sandy_brown, "\e[48;5;215m"],
-    [ :light_salmon_1, "\e[48;5;216m"],
-    [ :light_pink_1, "\e[48;5;217m"],
-    [ :pink_1, "\e[48;5;218m"],
-    [ :plum_1, "\e[48;5;219m"],
-    [ :gold_1, "\e[48;5;220m"],
-    [ :light_goldenrod_2, "\e[48;5;221m"],
-    [ :light_goldenrod_2, "\e[48;5;222m"],
-    [ :navajo_white_1, "\e[48;5;223m"],
-    [ :misty_rose_1, "\e[48;5;224m"],
-    [ :thistle_1, "\e[48;5;225m"],
-    [ :yellow_1, "\e[48;5;226m"],
-    [ :light_goldenrod_1, "\e[48;5;227m"],
-    [ :khaki_1, "\e[48;5;228m"],
-    [ :wheat_1, "\e[48;5;229m"],
-    [ :cornsilk_1, "\e[48;5;230m"],
-    [ :grey_100, "\e[48;5;231m"],
-    [ :grey_3, "\e[48;5;232m"],
-    [ :grey_7, "\e[48;5;233m"],
-    [ :grey_11, "\e[48;5;234m"],
-    [ :grey_15, "\e[48;5;235m"],
-    [ :grey_19, "\e[48;5;236m"],
-    [ :grey_23, "\e[48;5;237m"],
-    [ :grey_27, "\e[48;5;238m"],
-    [ :grey_30, "\e[48;5;239m"],
-    [ :grey_35, "\e[48;5;240m"],
-    [ :grey_39, "\e[48;5;241m"],
-    [ :grey_42, "\e[48;5;242m"],
-    [ :grey_46, "\e[48;5;243m"],
-    [ :grey_50, "\e[48;5;244m"],
-    [ :grey_54, "\e[48;5;245m"],
-    [ :grey_58, "\e[48;5;246m"],
-    [ :grey_62, "\e[48;5;247m"],
-    [ :grey_66, "\e[48;5;248m"],
-    [ :grey_70, "\e[48;5;249m"],
-    [ :grey_74, "\e[48;5;250m"],
-    [ :grey_78, "\e[48;5;251m"],
-    [ :grey_82, "\e[48;5;252m"],
-    [ :grey_85, "\e[48;5;253m"],
-    [ :grey_89, "\e[48;5;254m"],
-    [ :grey_93, "\e[48;5;255m"]
+      [ :grey0, 0],
+      [ :maroon, 1],
+      [ :green, 2],
+      [ :olive, 3],
+      [ :navy, 4],
+      [ :purple, 5],
+      [ :teal, 6],
+      [ :silver, 7],
+      [ :grey, 8],
+      [ :red, 9],
+      [ :lime, 10],
+      [ :yellow, 11],
+      [ :blue, 12],
+      [ :fuchsia, 13],
+      [ :aqua, 14],
+      [ :white, 15],
+      [ :black, 16],
+      [ :navyblue, 17],
+      [ :darkblue, 18],
+      [ :blue3, 19],
+      [ :blue3, 20],
+      [ :blue1, 21],
+      [ :darkgreen, 22],
+      [ :deepskyblue4, 23],
+      [ :deepskyblue4, 24],
+      [ :deepskyblue4, 25],
+      [ :dodgerblue3, 26],
+      [ :dodgerblue2, 27],
+      [ :green4, 28],
+      [ :springgreen4, 29],
+      [ :turquoise4, 30],
+      [ :deepskyblue3, 31],
+      [ :deepskyblue3, 32],
+      [ :dodgerblue1, 33],
+      [ :green3, 34],
+      [ :springgreen3, 35],
+      [ :darkcyan, 36],
+      [ :lightseagreen, 37],
+      [ :deepskyblue2, 38],
+      [ :deepskyblue1, 39],
+      [ :green3, 40],
+      [ :springgreen3, 41],
+      [ :springgreen2, 42],
+      [ :cyan3, 43],
+      [ :darkturquoise, 44],
+      [ :turquoise2, 45],
+      [ :green1, 46],
+      [ :springgreen2, 47],
+      [ :springgreen1, 48],
+      [ :mediumspringgreen, 49],
+      [ :cyan2, 50],
+      [ :cyan1, 51],
+      [ :cyan, 51],
+      [ :darkred, 52],
+      [ :deeppink4, 53],
+      [ :purple4, 54],
+      [ :purple4, 55],
+      [ :purple3, 56],
+      [ :blueviolet, 57],
+      [ :orange4, 58],
+      [ :grey37, 59],
+      [ :mediumpurple4, 60],
+      [ :slateblue3, 61],
+      [ :slateblue3, 62],
+      [ :royalblue1, 63],
+      [ :chartreuse4, 64],
+      [ :darkseagreen4, 65],
+      [ :paleturquoise4, 66],
+      [ :steelblue, 67],
+      [ :steelblue3, 68],
+      [ :cornflowerblue, 69],
+      [ :chartreuse3, 70],
+      [ :darkseagreen4, 71],
+      [ :cadetblue, 72],
+      [ :cadetblue, 73],
+      [ :skyblue3, 74],
+      [ :steelblue1, 75],
+      [ :chartreuse3, 76],
+      [ :palegreen3, 77],
+      [ :seagreen3, 78],
+      [ :aquamarine3, 79],
+      [ :mediumturquoise, 80],
+      [ :steelblue1, 81],
+      [ :chartreuse2, 82],
+      [ :seagreen2, 83],
+      [ :seagreen1, 84],
+      [ :seagreen1, 85],
+      [ :aquamarine1, 86],
+      [ :darkslategray2, 87],
+      [ :darkred, 88],
+      [ :deeppink4, 89],
+      [ :darkmagenta, 90],
+      [ :darkmagenta, 91],
+      [ :darkviolet, 92],
+      [ :purple, 93],
+      [ :orange4, 94],
+      [ :lightpink4, 95],
+      [ :plum4, 96],
+      [ :mediumpurple3, 97],
+      [ :mediumpurple3, 98],
+      [ :slateblue1, 99],
+      [ :yellow4, 100],
+      [ :wheat4, 101],
+      [ :grey53, 102],
+      [ :lightslategrey, 103],
+      [ :mediumpurple, 104],
+      [ :lightslateblue, 105],
+      [ :yellow4, 106],
+      [ :darkolivegreen3, 107],
+      [ :darkseagreen, 108],
+      [ :lightskyblue3, 109],
+      [ :lightskyblue3, 110],
+      [ :skyblue2, 111],
+      [ :chartreuse2, 112],
+      [ :darkolivegreen3, 113],
+      [ :palegreen3, 114],
+      [ :darkseagreen3, 115],
+      [ :darkslategray3, 116],
+      [ :skyblue1, 117],
+      [ :chartreuse1, 118],
+      [ :lightgreen, 119],
+      [ :lightgreen, 120],
+      [ :palegreen1, 121],
+      [ :aquamarine1, 122],
+      [ :darkslategray1, 123],
+      [ :red3, 124],
+      [ :deeppink4, 125],
+      [ :mediumvioletred, 126],
+      [ :magenta3, 127],
+      [ :darkviolet, 128],
+      [ :purple, 129],
+      [ :darkorange3, 130],
+      [ :indianred, 131],
+      [ :hotpink3, 132],
+      [ :mediumorchid3, 133],
+      [ :mediumorchid, 134],
+      [ :mediumpurple2, 135],
+      [ :darkgoldenrod, 136],
+      [ :lightsalmon3, 137],
+      [ :rosybrown, 138],
+      [ :grey63, 139],
+      [ :mediumpurple2, 140],
+      [ :mediumpurple1, 141],
+      [ :gold3, 142],
+      [ :darkkhaki, 143],
+      [ :navajowhite3, 144],
+      [ :grey69, 145],
+      [ :lightsteelblue3, 146],
+      [ :lightsteelblue, 147],
+      [ :yellow3, 148],
+      [ :darkolivegreen3, 149],
+      [ :darkseagreen3, 150],
+      [ :darkseagreen2, 151],
+      [ :lightcyan3, 152],
+      [ :lightskyblue1, 153],
+      [ :greenyellow, 154],
+      [ :darkolivegreen2, 155],
+      [ :palegreen1, 156],
+      [ :darkseagreen2, 157],
+      [ :darkseagreen1, 158],
+      [ :paleturquoise1, 159],
+      [ :red3, 160],
+      [ :deeppink3, 161],
+      [ :deeppink3, 162],
+      [ :magenta3, 163],
+      [ :magenta3, 164],
+      [ :magenta2, 165],
+      [ :darkorange3, 166],
+      [ :indianred, 167],
+      [ :hotpink3, 168],
+      [ :hotpink2, 169],
+      [ :orchid, 170],
+      [ :mediumorchid1, 171],
+      [ :orange3, 172],
+      [ :lightsalmon3, 173],
+      [ :lightpink3, 174],
+      [ :pink3, 175],
+      [ :plum3, 176],
+      [ :violet, 177],
+      [ :gold3, 178],
+      [ :lightgoldenrod3, 179],
+      [ :tan, 180],
+      [ :mistyrose3, 181],
+      [ :thistle3, 182],
+      [ :plum2, 183],
+      [ :yellow3, 184],
+      [ :khaki3, 185],
+      [ :lightgoldenrod2, 186],
+      [ :lightyellow3, 187],
+      [ :grey84, 188],
+      [ :lightsteelblue1, 189],
+      [ :yellow2, 190],
+      [ :darkolivegreen1, 191],
+      [ :darkolivegreen1, 192],
+      [ :darkseagreen1, 193],
+      [ :honeydew2, 194],
+      [ :lightcyan1, 195],
+      [ :red1, 196],
+      [ :deeppink2, 197],
+      [ :deeppink1, 198],
+      [ :deeppink1, 199],
+      [ :magenta2, 200],
+      [ :magenta1, 201],
+      [ :magenta, 201],
+      [ :orangered1, 202],
+      [ :indianred1, 203],
+      [ :indianred1, 204],
+      [ :hotpink, 205],
+      [ :hotpink, 206],
+      [ :mediumorchid1, 207],
+      [ :darkorange, 208],
+      [ :salmon1, 209],
+      [ :lightcoral, 210],
+      [ :palevioletred1, 211],
+      [ :orchid2, 212],
+      [ :orchid1, 213],
+      [ :orange1, 214],
+      [ :sandybrown, 215],
+      [ :lightsalmon1, 216],
+      [ :lightpink1, 217],
+      [ :pink1, 218],
+      [ :plum1, 219],
+      [ :gold1, 220],
+      [ :lightgoldenrod2, 221],
+      [ :lightgoldenrod2, 222],
+      [ :navajowhite1, 223],
+      [ :mistyrose1, 224],
+      [ :thistle1, 225],
+      [ :yellow1, 226],
+      [ :lightgoldenrod1, 227],
+      [ :khaki1, 228],
+      [ :wheat1, 229],
+      [ :cornsilk1, 230],
+      [ :grey100, 231],
+      [ :grey3, 232],
+      [ :grey7, 233],
+      [ :grey11, 234],
+      [ :grey15, 235],
+      [ :grey19, 236],
+      [ :grey23, 237],
+      [ :grey27, 238],
+      [ :grey30, 239],
+      [ :grey35, 240],
+      [ :grey39, 241],
+      [ :grey42, 242],
+      [ :grey46, 243],
+      [ :grey50, 244],
+      [ :grey54, 245],
+      [ :grey58, 246],
+      [ :grey62, 247],
+      [ :grey66, 248],
+      [ :grey70, 249],
+      [ :grey74, 250],
+      [ :grey78, 251],
+      [ :grey82, 252],
+      [ :grey85, 253],
+      [ :grey89, 254],
+      [ :grey93, 255],
     ]
-    
+
     @@attributes.each do |c, v|
       eval %Q{
         def #{c}(string = nil)
@@ -679,12 +577,12 @@ module Color
         end
       }
     end
-    
+
     module_function
     def attributes
       @@attributes.map { |c| c.first }
     end
-    
+
     def attribute att
       @@attributes.each do |e|
         return e.last if e.first.eql? att
@@ -697,40 +595,76 @@ end
 
 class FormatState
   attr_reader :parent
-  
-  def initialize(parent = nil, fg: nil, bg: nil, blink: nil, dim: nil, underlined: nil, bold: nil, reversed: nil)
+
+  def initialize(activate_color, parent = nil, fg: nil, bg: nil, blink: nil, dim: nil, underline: nil, bold: nil, reverse: nil, standout: nil)
+    @activate_color = activate_color
     @parent = parent
-    @fg = fg
-    @bg = bg
+
+    if fg.is_a? String
+      if fg.scan(/\D/).empty?
+        @fg = fg.to_i
+      else
+        @fg = Color::Foreground.attribute(fg.to_sym)
+      end
+    else
+      @fg = fg
+    end
+
+    if bg.is_a? String
+      if bg.scan(/\D/).empty?
+        @bg = bg.to_i
+      else
+        @bg = Color::Foreground.attribute(bg.to_sym)
+      end
+    else
+      @bg = bg
+    end
+
     @blink = blink
     @dim = dim
-    @underlined = underlined
+    @underline = underline
     @bold = bold
-    @reversed = reversed
+    @reverse = reverse
+    @standout = standout
   end
-  
-  def initialize(code, parent = nil)
+
+  def initialize(code, activate_color, parent = nil)
+    @activate_color = activate_color
     @parent = parent
     code_working = code.dup
-    
+
     code_working.gsub!(/\s\s*/i) do |match|
       " "
     end
-    
+
     fg_text = code_working[/fg\:([a-zA-Z0-9\_]*)\s*/i, 1].dup
     code_working.gsub!(/fg\:([a-zA-Z0-9\_]*)\s*/i) do |match|
       ""
     end
-    
+
     bg_text = code_working[/bg\:([a-zA-Z0-9\_]*)\s*/i, 1].dup
     code_working.gsub!(/bg\:([a-zA-Z0-9\_]*)\s*/i) do |match|
       ""
     end
-    
+
     formatting_text = code.strip.split(' ')
-    
-    @fg = Color::Foreground.attribute(fg_text.to_sym) unless fg_text.nil?
-    @bg = Color::Background.attribute(bg_text.to_sym) unless bg_text.nil?
+
+    unless fg_text.nil?
+      if fg_text.scan(/\D/).empty?
+        @fg = fg_text.to_i
+      else
+        @fg = Color::Foreground.attribute(fg_text.to_sym)
+      end
+    end
+
+    unless bg_text.nil?
+      if bg_text.scan(/\D/).empty?
+        @bg = bg_text.to_i
+      else
+        @bg = Color::Foreground.attribute(bg_text.to_sym)
+      end
+    end
+
     formatting_text.each do |format|
       case format
       when "blink"
@@ -749,71 +683,110 @@ class FormatState
         @bold = true
       when "nobold"
         @bold = false
-      when "reversed"
-        @reversed = true
-      when "noreversed"
-        @reversed = false
+      when "reverse"
+        @reverse = true
+      when "noreverse"
+        @reverse = false
+      when "standout"
+        @standout = true
+      when "nostandout"
+        @standout = false
       end
     end
   end
-  
+
   def fg
     return @fg unless @fg.nil?
     return @parent.fg unless @parent.nil?
-    nil  
+    Color::Foreground.attribute(:white)
   end
-  
+
   def bg
     return @bg unless @bg.nil?
     return @parent.bg unless @parent.nil?
-    nil 
+    Color::Background.attribute(:black)
   end
-  
+
   def blink?
     return @blink unless @blink.nil?
     return @parent.blink? unless @parent.nil?
-    nil 
+    false
   end
-  
+
   def dim?
     return @dim unless @dim.nil?
     return @parent.dim? unless @parent.nil?
-    nil 
+    false
   end
-  
+
   def bold?
     return @bold unless @bold.nil?
     return @parent.bold? unless @parent.nil?
-    nil 
+    false
   end
-  
-  def underlined?
-    return @underlined unless @underlined.nil?
-    return @parent.underlined? unless @parent.nil?
-    nil 
+
+  def underline?
+    return @underline unless @underline.nil?
+    return @parent.underline? unless @parent.nil?
+    false
   end
-  
-  def reversed?
-    return @reversed unless @reversed.nil?
-    return @parent.reversed? unless @parent.nil?
-    nil 
+
+  def reverse?
+    return @reverse unless @reversed.nil?
+    return @parent.reverse? unless @parent.nil?
+    false
   end
-  
-  def apply
-    result = ""
-    result += Color::Reset.all + Color::Reset.blink + Color::Reset.bold + Color::Reset.dim + Color::Reset.underlined + Color::Reset.reverse
-    result += self.fg unless self.fg.nil?
-    result += self.bg unless self.bg.nil?
-    result += Color::Formatting.blink if self.blink?
-    result += Color::Formatting.dim if self.dim?
-    result += Color::Formatting.bold if self.bold?
-    result += Color::Formatting.underlined if self.underlined?
-    result += Color::Formatting.reversed if self.reversed?
-    result
+
+  def standout?
+    return @standout unless @standout.nil?
+    return @parent.standout? unless @parent.nil?
+    false
   end
-  
-  def revert
-    return @parent.apply unless @parent.nil?
-    return Color::Reset.all + Color::Reset.blink + Color::Reset.bold + Color::Reset.dim + Color::Reset.underlined + Color::Reset.reverse
+
+  def apply(window)
+    @activate_color.call(self.fg, self.bg)
+
+    if blink?
+      window.attron(Ncurses::A_BLINK)
+    else
+      window.attroff(Ncurses::A_BLINK)
+    end
+
+    if dim?
+      window.attron(Ncurses::A_DIM)
+    else
+      window.attroff(Ncurses::A_DIM)
+    end
+
+    if bold?
+      window.attron(Ncurses::A_BOLD)
+    else
+      window.attroff(Ncurses::A_BOLD)
+    end
+
+    if underline?
+      window.attron(Ncurses::A_UNDERLINE)
+    else
+      window.attroff(Ncurses::A_UNDERLINE)
+    end
+
+    if reverse?
+      window.attron(Ncurses::A_REVERSE)
+    else
+      window.attroff(Ncurses::A_REVERSE)
+    end
+
+    if standout?
+      window.attron(Ncurses::A_STANDOUT)
+    else
+      window.attroff(Ncurses::A_STANDOUT)
+    end
+  end
+
+  def revert(window)
+    return @parent.apply(window) unless @parent.nil?
+
+    @activate_color.call(Color::Foreground.attribute(:white), Color::Background.attribute(:black))
+    window.attrset(Ncurses::A_NORMAL)
   end
 end
diff --git a/lib/aethyr/core/render/window.rb b/lib/aethyr/core/render/window.rb
new file mode 100644
index 0000000000000000000000000000000000000000..fa4f4ccabaf9fcab3a3c42dc09552a2a61834fa0
--- /dev/null
+++ b/lib/aethyr/core/render/window.rb
@@ -0,0 +1,307 @@
+require "ncursesw"
+
+class Window
+  attr_reader :window_border, :window_text, :buffer, :buffer_lines, :text_height, :text_width, :x, :y, :height, :width, :buffered, :use_color, :buffer_size, :color_settings, :buffer_pos
+  attr_accessor :selected
+
+  def initialize( color_settings, buffered: false, buffer_size: 10000, paginate: nil )
+    @buffer = [] if buffered
+    @buffer_lines = [] if buffered
+    @buffer_pos = 0 if buffered
+    @buffer_size = buffer_size if buffered
+    @buffered = buffered
+    @selected = false
+    @use_color = false
+    @color_settings = color_settings
+    @color_stack = []
+    @exists = false
+    @paginate = paginate
+  end
+
+  def exists?
+    return @exists
+  end
+
+  def create(width: 0, height: 0, x: 0, y: 0)
+    raise "width out of range" unless width >= 0
+    raise "height out of range" unless height >= 0
+    raise "x out of range" unless x >= 0
+    raise "y out of range" unless y >= 0
+    @height = height
+    @width = width
+    @x = x
+    @y = y
+
+    destroy
+    @exists = true
+    @window_border = Ncurses::WINDOW.new(@height, @width, @y, @x)
+    @window_border_height = @window_border.getmaxy - 2
+    @window_border_width = @window_border.getmaxx - 2
+    @window_text = @window_border.derwin(@window_border_height, @window_border_width, 1, 1)
+    @text_height = @window_text.getmaxy - 2
+    @text_width = @window_text.getmaxx - 2
+    Ncurses.scrollok(@window_text, true)
+    @window_text.clear
+    @window_text.move(@text_height, 1)
+
+    if buffered
+      @buffer_pos = 0 if @buffered
+      parse_buffer
+      buffer_from = [@buffer_lines.length * -1, -1 * (@height + @buffer_pos + 1)].max
+      buffer_to = [@buffer_lines.length * -1, (@buffer_pos + 1) * -1].max
+
+      @buffer_lines[buffer_from..buffer_to].each do | message|
+        render(message)
+      end
+    end
+  end
+
+  def destroy
+    @exists = false
+    Ncurses.delwin(@window_border) unless @window_border.nil?
+    @window_border = nil
+    @window_text = nil
+    @selected = false
+  end
+
+  def update
+    white_fg = Color::Foreground.attribute(:white)
+    grey_fg = Color::Foreground.attribute(:grey)
+    black_bg = Color::Background.attribute(:black)
+
+    if @use_color
+      activate_color_window(@window_border, grey_fg, black_bg) unless @window_border.nil?
+    end
+
+    default_border = 32
+    @window_border.border(*([default_border]*8)) unless @window_border.nil?
+
+    if @use_color
+      activate_color_window(@window_border, white_fg, black_bg) if @selected && @window_border.nil? == false
+    end
+
+    @window_border.border(*([0]*8)) if @selected && @window_border.nil? == false
+
+    @window_border.noutrefresh() unless @window_border.nil?
+    @window_text.noutrefresh() unless @window_text.nil?
+  end
+
+  def enable_color
+    @use_color = true
+  end
+
+  def activate_color(fg, bg)
+    activate_color_window(@window_text, fg, bg)
+  end
+
+  def clear
+    @window_text.clear
+  end
+
+  def send (message, word_wrap = true, add_newline: true)
+    unless @buffer.nil?
+      @buffer << message.dup
+      @buffer << "" if add_newline
+      @buffer.drop(@buffer.length - @buffer_size) if @buffer.length > @buffer_size
+    end
+
+    message = message.tr("\r", '')
+    if buffered
+      render_buffer
+    else
+      render(message, add_newline: add_newline)
+    end
+    update
+  end
+
+  def buffer_pos= new_pos
+    @buffer_pos = new_pos if new_pos <= @buffer_size && new_pos <= @buffer_lines.length - @text_height && new_pos >= 0
+    render_buffer
+    update
+  end
+
+  def self.split_message(message, cols = @text_width)
+    new_message = message.gsub(/\t/, '     ')
+    new_message.tr!("\r", '')
+
+    last_was_text = false
+    buffer_lines = []
+    new_message.split(/(\n)/) do |line|
+      next if line.nil? || line.length == 0
+      if line.length == 1 && line.start_with?("\n")
+        if last_was_text
+          last_was_text = false
+        else
+          buffer_lines << ""
+        end
+      else
+        buffer_lines.concat(word_wrap(line, cols))
+        last_was_text = true
+      end
+    end
+    return buffer_lines
+  end
+
+  def self.word_wrap(line, cols = @text_width)
+    lines = []
+    new_line = ""
+    new_line_length = 0
+    next_line = ""
+    next_line_length = 0
+    inside_tag = false
+    line.each_char do |c|
+      if c =~ /\S/
+        next_line += c
+        if c == "<"
+          inside_tag = true
+        elsif c == ">"
+          inside_tag = false
+        elsif inside_tag == false
+          next_line_length += 1
+        end
+
+        if next_line_length + new_line_length >= cols
+          if new_line_length == 0
+            lines << new_line + next_line
+            next_line = ""
+            new_line = ""
+            next_line_length = 0
+          else
+            lines << new_line
+            new_line = ""
+            new_line_length = 0
+          end
+        end
+      elsif next_line.length == 0
+        new_line += c
+        new_line_length += 1 unless inside_tag
+      else
+        if next_line_length + new_line_length >= cols
+          lines << (new_line + next_line + c)
+          new_line = ""
+          new_line_length = 0
+          next_line = ""
+          next_line_length = 0
+        else
+          new_line += next_line + c
+          new_line_length += next_line_length
+          new_line_length += 1 unless inside_tag
+          next_line = ""
+          next_line_length = 0
+        end
+      end
+    end
+    lines << new_line + next_line if new_line.length > 0 || next_line.length > 0
+    return lines
+  end
+
+  private
+  # def paginate(message, cols = @text_width)
+  #   return word_wrap(message, cols) if @paginate.nil?
+  #
+  #   ph = @paginate
+  #
+  #   out = []
+  #   #message = message.gsub(/((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m|[^\r\n\n\s\Z]){#@word_wrap})/, "\\1 ") if @word_wrap
+  #   message = wrap(message, @word_wrap).join("\r\n") if @word_wrap
+  #   message.scan(/((((\e\[\d+[\;]{0,1}\d*[\;]{0,1}\d*m)|.){1,#{@word_wrap}})(\r\n|\n|\s+|\Z))|(\r\n|\n)/) do |m|
+  #     if $2
+  #       out << $2
+  #     else
+  #       out << ""
+  #     end
+  #   end
+  #
+  #   if out.length < ph
+  #     return out.join("\r\n")
+  #   end
+  #
+  #   @paginator = KPaginator.new(self, out)
+  #   @paginator.more
+  # end
+
+  def activate_color_window(window, fg, bg)
+    return if not @use_color
+    #window.attron(fg + bg * Ncurses.COLORS)
+    if Ncurses.respond_to?(:color_set)
+      window.color_set(fg + bg * Ncurses.COLORS, nil)
+    else
+      window.attrset(Ncurses.COLOR_PAIR(fg + bg * Ncurses.COLORS))
+    end
+  end
+
+  def render_buffer
+    parse_buffer
+    buffer_from = [@buffer_lines.length * -1, -1 * (@text_height + @buffer_pos + 1)].max
+    buffer_to = [@buffer_lines.length * -1, (@buffer_pos + 1) * -1].max
+
+    @window_text.move(0,0)
+    @buffer_lines[buffer_from..buffer_to].each do | message|
+      colored_send(message + "\n")
+    end
+  end
+
+  def render(message, add_newline: true)
+    message += "\n" if add_newline
+    colored_send(message)
+  end
+
+  def colored_send(message)
+    regular_format = nil
+    if @use_color
+      regular_format = FormatState.new(@color_settings["regular"], self.method(:activate_color))
+      regular_format.apply(@window_text)
+    end
+
+    colors = @color_settings.keys.dup
+    colors << "raw[^>]*"
+    colors = colors.join("|")
+
+    message.split(/(<[\/]{0,1}[^>]*>)/i).each do |part|
+      if part.start_with? "<"
+        if @use_color
+          part.match(/<([\/]{0,1})([^>]*)>/i) do
+            if ($1.nil?) || ($1.length <= 0)
+              color_encode($2)
+            else
+              color_decode($2)
+            end
+          end
+        end
+      else
+        @window_text.addstr("#{part}")
+      end
+    end
+
+    if @use_color
+      regular_format.revert(@window_text)
+    end
+  end
+
+  def color_encode(code)
+    parent = @color_stack[-1]
+    code = code.downcase
+    code = "regular" if code.nil? || code.empty? || @color_settings[code].nil?
+    unless code.start_with? "raw "
+      result = FormatState.new(@color_settings[code], self.method(:activate_color), parent)
+    else
+      /raw (?<code>.*)/ =~ code
+      result = FormatState.new(code, self.method(:activate_color), parent)
+    end
+    @color_stack << result
+    result.apply(@window_text)
+  end
+
+  def color_decode(code)
+    @color_stack.pop.revert(@window_text)
+  end
+
+  def parse_buffer(cols = @text_width)
+    raise "channel has no buffer" if buffer.nil?
+    @buffer_lines  = []
+
+    @buffer.each do |message|
+      @buffer_lines.concat(Window.split_message(message, cols))
+    end
+  end
+end
diff --git a/lib/aethyr/core/util/all-commands.rb b/lib/aethyr/core/util/all-commands.rb
index d1111474ddf611d38148e1fb9677b816a5612fab..4b86dd5776d08e891e3cb92c570187e85ed42171 100644
--- a/lib/aethyr/core/util/all-commands.rb
+++ b/lib/aethyr/core/util/all-commands.rb
@@ -22,5 +22,5 @@
 #require 'aethyr/core/commands/weapon_combat'
 
 require 'require_all'
-require_all 'lib/aethyr/core/commands'
-require_all 'lib/aethyr/extensions/commands'
\ No newline at end of file
+require_all 'lib/aethyr/core/commands/'
+require_all 'lib/aethyr/extensions/commands/'
diff --git a/lib/aethyr/extensions/commands/.keep b/lib/aethyr/extensions/commands/.keep
new file mode 100644
index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391