code cleanup and second lab finished