Reordered classes and added foreground animation