Added comments/finalized code