(cleanup) implement core mongo server and add newlines