Updated code to respect coding style. Fixed issued #605