Separating Logic from ui cleaning up