Finalized and debugged with extra notes.