Fix test side effects, formatting, added new unit test
Created main class, added some comments and refactoring
Stub for 2nd algorithm