Cleaned up limit logic