Added guild api

Added the guild api entry point and fixed parts of the manager classes
required by it