Finish tests and fix stuff