new functions, bug fixes and trf1-pj settings changes