adding testing, and cleaning up