updated tests and cleanups