Added Array

Added a global attribute array, initialize attr function, and removed
unnecessary variables