1. A method comprising: controlling an implantable medical device using a controller having a plurality of modular features, the controller having a firmware architecture allowing modular feature design and implementation; coordinating between and among the plurality of modular features to reduce feature-to-feature interactions; and identifying at least one first modular feature working in a rate domain and at least one second modular feature working in an interval domain, enabling efficient conversion between the rate domain and the interval domain.