simplified a few things, added analog reading, and made bounce work going backwards.