Added startup task example and code cleanup