separate scalars, code cleanup