Bug fixes; correct status lines when outputting by line; set subroutines by variable rather than redefining