Implemented different modes, small updates in ui.