Cleaning code and documenting