Re-Sharper code cleanup

General code inspection and tidy up.  Redundancies etc.