Add entry point guards
Merge pull request #2 from wmde/guards

Add entry point guards