Base Code for the waffle framework