Auto register multiple

rebases and fixes #22