Unused blocks replaced with nil. Some constants refactored.