Removed the mDetect class, and moved the key pieces to twig.php