Work on input, bug with unit spawning appeared