added layout and some structure rework