Code now works

Code and comments have been written. Everything should work.