Lots of cleanup. Trying to fix the observer pattern