added lots/refactored based on BabyEngine. Understanding most of it, but missing something important evidently.