General refactoring for less complexity

No need for a processed array. Input can be taken in a simpler way. Input reading is currently broken now though when dealing with whitespace.