Implemented better handling of iloci. Seems to work fine, but more thorough automated testing needed (see #37). Closes #77.