syntax improvements and 1 bug fix