Rewrite using short array syntax
Remove debug code