fix tests and move tests in to test/