Finished draft

Code seems to be all there but something keeps resetting the code...