Added commands framework to the core
Made events.on return on undefined callback so all those ifs could be avoided