Real cleanup of unused functions