Updated and refactored some code

- Cleanup up: CaptureBuildings, GameLoop, GameManager and production
script with some testing code and comments.
- Refactored small portion of factorys. No duplicate code.