Finally got IntelliJ to work. Here's some source ported over from an incomplete development build of ImgMap.