Changed arrays from shorthand
Added error handler to error console