adding some test coverage
reinstating debug tools since I still have bugs
updated tests
indentation changes