More code, testing for correctness. Had to make a lot of tabs vs spaces fixes