bug fixes, remove tests