Cleaned up using suggestions from hlint.