Made a more systematic inspection system and moved phar creation code to functions.php