Removed bug in pupil counting. progably plenty left ;)