Things are working way better. Cleaned up some stuff.
Reformatted the code.