Adds dynamic screen width detection at start

Adds functions and parameters to use functions to bars to get screen
height and width.