Fixes #1 More dynamic way of defining entry point