Cleaned up lots of code in Input