Added more comprehensive unittests, provided interfaces to use mamaMiddlewareLibrary anywhere were mamaBridge was used and some bug fixes found during unittesting