Define level format and write level loader