Final Code

Finished code with commented sections