manual and resharper code cleanup