Now that things barely work, start refactoring it so I can add automagic