Modifications to increase modularity of jp2 coding/decoding