Finished parsing input, working on factoring.