Only initialises once

Stopped the function being initialised for each time the module is
instantiated. Also sorted another example, using all defaults.