Some code development.

Just providing some code for first alpha release.
Touched model