Added an init callback when dxes.js is used asynchronously
Some cosmetic changes