Solved code issues indicated by the ReSharper