Fixed bouncing bug. And create spritemap functions.