Reformat whole codebase and usage of embedding field in database