DEP-89 [DEP-101]

Added some new tests, corrected the old ones and slightly improved some
methods.