Moved register classes to globals and made it static