Do some much needed tidying in jlogctl.

This cleans up the code in prep for some additional features and
readability.