Cleaned up code for control