refactor file structure for apis. add joins for ratings and users.