Simplify construct_controls()
Separate function for waiting for data in socket