Improving support for variables and various bugfixes.