Fix all typos and compile errors