Added parameter for worldsize, fixed world dimension references.