Added Page and Line classes to reorganise line information.