Added INPUT class. Used INPUT class to generate smoother moving animation