Refactoring, better code documentation and custom AI autoload mechanism.

Moved code to separate namespaces. Made custom ui autoload mechanism. Added code documentation and updated README.