added support for assignining a priority to classes, a few more changes related to nested classes