Reorg deps to subdirs.
Split terminal.rb into separate files.
Reorg development deps into separate files.