Added funciton for adding listeners to input. Fix for input time
Added destroy function