Move top-scope code into main() function

So that I can use simple_functions from another module via `import`
without the top-scope code being run.
Merge pull request #1 from paulfurley/move-print-into-main-function

Move top-scope code into main() function