Finally functional code. Plugin loading is functional and the game can be played