i know, i know, this isnt JS. removed explicit self references. started rewrite.