Added some tab-completion, and a little code cleanup.
Started moving stuff to the "api" package. Might move this to a separate
project and have it auto-upload to maven at some point.
Some cleanup and other odds and ends.