removed debugging and other minor bug fixes