Refactored

Modified complicated if's to case.
Modified ternary checking for nil to if's so easier to read.
Removed unnecessary return statements.
Refactored large methods into smaller bite-sized ones.