code cleanup in pyNetLogo