arg parsing function, top lvl environment

- moved argument parsing into its own function
- added main environment stanca