Changed layout and some functionality