Rename folders and add c functions