ran some initial tests

ran some initial tests and cleaned up the code