added examples that kind of double as unit tests.
added more verification to the code. I wanna rewrite it with nice unit tests >_>