fix a bug in naive layered and improve docs a little