Major refactoring of Cake (console application).