Refactor fade in/out to separate functions.