Corrected PQ insert function, allocation
Refactored code

Separated parts of code to more files
Moved GameState, new function createNewState