Fixed various bugs preventing the app from running...