handling ReSharper issues and got rid of Hack