Improved code-coverage, and removed deprecated code.