File added by accident
Fixed #521; tightened type checking