fixup internal reference labling to make code more readable

separated PR from #113