Cleanup and merge tests