Update core.php

This needs to be cleaned up...