Reordered Layout, worked in Mathlab

Reorganised Layout using Mathlab. Based on v0.6