Refactoring in order to use css 3d transformation.