Fixing the tests to be able to test correctly.
Fixed some more random bugs, but still some more to squash.
Some changes to work on getting he commands fully functional again and some miscellaneous cleanup.