Move sidebar to mst and cleanup code gen