Cleaning up code; finished array library