added some test framework
fixed some compile errors
Fixed compile errors
git it all to compile