Add missing semicolons and newlines