moved api stuff to a service
added servlets needed