Added 'input' event for browsers that support it. More cleaning and naming updated