Removed lots of dead / unused / untested code. Disabled CLI for scripts.