updated main WebAPI class to use new classes
some basic synchronization fixes for api instance