Added more test files
Small bugfixes caught by test cases