Use textwidth for buffer width if set.
Use user defined width if set.
Don't create a side buffer if the current window is too narrow.

Creating a side buffer in all situations can sometimes do more damage than
help. Also, include line numbers column into width calculation.
Refactoring.
Use consistent casing.
Make all comments uniform.
Prefix a global variable name.