cleanup: use new array syntax and declare parameter types where possible