Somewhat fixed
got rid of all the compile errors