Fixes output format of palette file.
Ports full item id list and related functions from mcra package
to javascript. We will be needing this on the client side.