Removed comparison to boolean
Fixed spacing
Simplified if-else type of functions returning a boolean