Removed use of Array.Resize and switched input management to List<int>