Added some constants and refactored another