code cleanup and started work on making display scalable