issue#1, #2, #3 for project 1 2 and 3

this is the version that will compile and works on CSIL machine.