undo php5.4 shortened array syntax, remove unused globals