Moved Tornado IOLoop to main() to resolve shutdown issues plus we now use IOLoop to control checks for startup tasks and background commands.
Merge remote-tracking branch 'upstream/dev' into testing