Rewritten CLIFramework. Fixed bugs.