Bugfix and code cleanup
Building out apps, preparing for move to Node server