Soms code cleanup