Added verification of line and column numbers and fixed bugs.