Added better testing and API usage.