[Enhancement] - Enclosed screenSize function and made global