Cleaned up the logic

Now that appfest is over, I have a bit more time to clean up the hacks I
did to get it built in only 2 hours