More work in hplex.pl

Probably not functional still.