Cleanup on install
preg_replace fix for php 5.5 compatibility
removed mysql_connect for php 5.5 compatability
stop touching the DB on every call.