clean unused scripts and functions