fix array destructuring syntax
fix and cleanup destructuring