Fixed errors - examples 1,2 are working

Also started to add test files