added merged code from game changes on moved source code.