made some improvments
migrated from legacy j2x to mxj and made some enhancements and error handling