Implemented initial input parsing