Fixed the NPEs and made the class names user-friendly