Remove some waste from functions.php
Move some CORE functions to lib-core.php