Rewrite some, start models
Some fixes, add small example script to create DB entries