Cleaned up Class calls, added a logical test for length of input