Updated all the code with documentation