Some additional test cases and cleanups