Declare a constructor for defining snapshot version initialized contructor
Fix most compilation errors
fix all compiling problems