Moves abstract REST controller into /lib.