[ADD] File structure and refactor custom api