small syntax fixes
optimize pattern matching
project properties: load from preferences only on demand