Commit before another attempt at restructuring
Finally figured out a structure that works