Added a number of methods and tests.