Added a test suite, made bug fixes that were found because of test suite