Rewrote IntMap wrapper to be more comprehensive, more documented, and cleaner