input refactor

attach event listeners with JS instead of HTML
create global variables for parameter values
create framework for ball collisions