use attoparsec for inputs
clean up
pull more out of main
clean up