use array instead of arraybuffer
remove unused imports
+= doesn't like shorts