Added player and dummy mask function.
Fixed some bugs in player.