This is superseeded by the new PLModel object. Also remove old helper functions which are not used anymore.