RFM class

Use the added RFM class to get rid of magic numbers.