fixed minor comment error
encapsulated autoloader to private class methods
added some exception types
migrated trigger_error calls to proper exceptions