Prepare for language statement

Some preparatory changes from #119 for adding language statements. They also come before fixing #55.