Final Version - Code documented