Changed input callbacks to be done through inheritance rather than function pointers