created a common setup method and implemented various inits to call it, ...

... fixes #38,   Suggested fix for this issue.