new version. Fixed a lot of stuff and added examples.