cleaning up tests and remaining bugs