Now works again.
Cleaned up a few things and tried to make it run smoother
(unsuccessfully)