fixing build errors, organizing tests