Bug fixing

Formated code, renamed the class extend for class.enhance, addded
methods to manage the ajax and external calls