Refactored constant names and cleaned things up.