whitespace changes
some more whitespace
shared instance and function declarations
bugfix make sure the value is cast to what it is

expected to be
changes to examples, have not testrun these