API semantics

Cleaned up the core/server/api.js by removing unused variables, as well as making the module exports to be more semantic.