Minor refactoring and updated language specification