Refactored the array index to use an enum ordinal.
Removed caching from hibernate config due to errors.