Improve build
Implement api interface and add server certificate