Refactor

Work on RX to get rid of more magic numbers.