Lots of undates.

* Namespaces added
* Stroke functions moved to tool class
* Some little changes