Clean up code. Use one-line if statement
Fix typo