Fixes on framework, added cli.php