First commit on changing the module to be more dynamic.

Splitting up the basic and instance part.
Adding spec tests