Global objects

Global logfile, global registry and thePlayer pointer. Also added some comments.