Added maintenance record rules and JS functions