Added hpsMorph transformation and some small changes