refactored some stuff... might abandon ship.