On loss characterisation and minimisation in high-performance reciprocating-piston expanders