Split REST API into separate classes