Removes unnecessary functions.