Started a rewrite (more or less the same code, but restructured). The code WILL BE compiled into one file, as before.