fix global indentation
use angular.isArray()
remove console.log