Separated old and new code.