Improvements to ability learning and item codes, some engine changes