registerIndex now works when running from jar. Closes #4.