Changed the helper methods for creating indexes a bit.