Added hook functionality. Added utility function. Added init function for player.