ENH: Handle inputs in a cleaner way