Refactored javamelody related code