Moved is_outside to private and added a static size function for utility.