Removed the use of properties to support ES3, and added defaultOptions.