refactoring
gigantic refactor that probably broke a bunch of shit