Clean up code, use shortcut for if statement