Removes unnecessary methods.