Finalized code for project