Prateek | move display related logic to display.js