Separated controls handling from UI