Remove singletons and global objects, only leave ApiManager to ease unit
testing