Better handling of errors.
Fixed styling of app delegate.
Merge pull request #3 from jordanperry/working

Better handling of errors and style fixes