Refactored for proper scoping. Fixed movement and added bullet firing.