some cleanup of the codes.