Final tests completed. Did some minor touches to improve API.