8600 cleanup, add defines for constants, improve memory error handling