Allow arrays in script text

I'm fairly certain this still needs to be rootScope because of some errors I was encountering. Check your console and let me know if you're getting any errors with this code?