Refactor to avoid using variables named id
Fix typo resulting in move not working right
Modify world-gen code.