Moved commands into commands thread. Almost ready for an initial release.