Reinstated import guards

Closes #158