- Fixed cross-browser issues

- Fixed cross-browser issues
- Improved image tiling by sorting before packing