[World gen] several functions refactored
-- seg fault errors should be fixed
--using Position type more to simplify things