Complete Refactor

- Reorganized files and rewrote logic
- Wrote tests for all functionality
- Updated README documentation

@bsiddiqui @leore