Added json function
Split the wl function and added functionality to only show
a limited number of lines