Refactors Input to store the name as an attribute