Implemented edge wrapping (toggleable in settings).