Refactored code

Just installed ReSharper today and I have a lot of re-factoring + making
consistent selections between the tabs.