Made API more fault tolerant and initial doc framework