Complete Rewrite of beds to an engine