Refactored code

Code has been refactored into 3 new packages (4 total).

No changes to the code itself have been made.