Simpler code after adding webkit transforms support