Cleaning up Controller and Thread logic