Complete sidebar logic added.