Move cd function to lisp level.