Implementation of improved database API which is yet to be fully completed and initial implementation of semi correct post saving routine