fixed some bad refs n player class and main