Syntax improvements. Split into modules. Various minor improvements.