refactored main class, updated README, updated tests