Implemented interfaces, refactored a bunch
Fixed a bunch of bugs that were introduced after refactoring