Fixed some compile issues. Now the code runs