clean and add unit test coverage

- cleaned control flow
- added util test
- enforce ~0.969MB max file size
- removed `pip` junk from setup