Simplify expression as suggested by AppCode
Killed 58 lines of unreachable code (thanks AppCode!)
Fix typos in comments and variable names (thanks AppCode!)
Add cast to correct unmatched type issue (thanks AppCode!)
Inline method (thanks AppCode!)
Slightly saner error handling (thanks AppCode!)