Cleaned up code and switched to Collections