added ability to move with hjkl

minor refactor to pull out displayLines into a function
that is called in a loop