Fix compilation errors
Add test case scaffold.