Refactor show lines of code function.