Fixed syntax errors and redundent lists introduced in c1101858a2086f288672e27b32f2fe5f8870f982. Please test code before pushing to master.