Refactor getInputClass
Move to work