Adding various refactorings to various scripts, fixing the respawn/checkpoint system