Issue #6: Created subclasses, cleaned some code