Extracted some stuff in an external library located at thezombie.net/libgojira