scroll code cleanup