variables static, and created functions that manipulate them. Created new headers. Renamed some variables and functions to make their names more menanigful.