Refactor functions related to rtable
Move types from csp.h into csp_types.h and include csp_rtable in csp.h to export all functions to user