Massive rewrite. Now it actually works.
added POD