animation code cleaned up, ready to incorporate scrolling background