Fixed code. Still WIP to finish.

Here you go! This sets things functional and should be easier to finish. Good luck!