Removed obsolete code
Fix parentheses and punctuation parsing
Use array ranges instead of concatenation