Style corrected code thanks to hlint