Eliminated duplicate code in inputs
Likely a few bugs in them