Updated to the point of compilation with out errors