M5 version 2

fixed layout and UI stuff.