Adding some documentation, Fixing bugs, Upd. unit tests