some input clean ups
merged with aaron krolik's version