Refactoring

Cleaned up a lot of code duplication around object instantiation and
gave a consistent look and feel to the creation process used by classes.