Bug fixes, more console tests. (Should JUnit?)