added shooting mechanic and some refactoring