massive refactor!

modules now work as one would expect and return constructors.
still to port the majority of widgets...