Refactored random tester
Fixed serialization of numbers, parser crash for empty input