Completed restruction for divede Layout and function and better
multicore support