Cleaner method for creating objects with class