Delayed size checking until I understand the requirements
Fixed typing issues