Added serialize of UILayout

Also started on unit-test