Fully Functional Code + more comments