Parse input into objects