Improve/unify approach to line indexing. * Use consistently type MD_SIZE for line indeces. * Remove pointer arithmetic if lines and replace it with line index arithmetic. This resolves some warnings in MSVC builds. See PR #232. Co-authored-by: Martin Mitas <mity@morous.org> Co-authored-by: Shawn Rutledge <s@ecloud.org>