A lot of changes to get started on this again

Mostly refactoring changes now that I've learnt a lot of stuff about JS
and other Node.js stuff.

Soon enough this will be revived and I will start working on it again.
Hopefully.