Proper line numbers
Initial tests and fixes