Move a bunch of code into a proper dispatcher instead of having it live in App