updated sloc_counter to handle whitespace
tiny amount of generator tomfoolery