Refactor to use CSS transition and transformation #1