Move code into element