Improved tests, fixed some bugs in GameplayManager.