Test coverage and cleanups