Trimmed some useless code From mantis model