Resharper optimalizations and code clean up