Clean up if for #23
Closes #23