adding curly brackets to get rid of lint errors

@FredKSchott this should fix the curly brace lint errors. I saw a mix of styles on where to put `else` and `else if` and if the curly brace was kept in on the same line as the body or not. I used my best judgement, but am happy to change if others have problems with either style. Just want to get rid of those lint errors. :)