soem code cleanup