Added code from final project submission.