Code cleanup and proper onDestroy handling in service