Improve connectivity with proper use of lifecycle methods