Simplify communication and improve API endpoints