Improve and comment the app widget implementation