remove minor bugs. All tests passing now