Added a options parameter to the Resource constructor allowing us to pass things such as model object when creating the resource.
Fix indentation