Correct end detection of numbers with a dot

Also updated the test suite.
Implement proper error reporting
Move misplaced test case