Cleaned code and renamed array