cont: moving global objects into the handler class