Refactored: removed useless interface ThresholdFunction, improved JAXB mapping, etc.