Finalized code for deployment