refactoring bg animation and adding info to code samples