Add tests, docs, doctests for module Xutils