Creating a looper/handler and cleanup