Added synchronized keyword on API methods.