Code cleanup and new sun set transition