Includes several new test cases