Changes code to follow hlints suggestions.