Added remainder of public functions and tests