Added test for a single number larger than 1000
Refactored handling of single integers, added test for illegal input