Factor out "cake" functionality into separate directory.