Updated documentation and code formating