Trimmed some unused functions