1. Added test cases. 
2. Fixed up the build.