moved Server API into server as lib. Fixed autocompletion