Adding source formatting rules
merged from dirk/master (closes #1).