Add sidebar struct to hold state
Implement linecounter