Code cleanup.

All files was refactored with ReSharper. The goal was to achieve Green
light where is practical.