Moved animation code out of completion block and into animations block