How to use register values of a class inside a module

In reply to myselfprakhar:

Should have worked. In any case, try putting the new inside the initial statement.
Ben