major structural/architectural refactor. looks much better, and the code is much cleaner