Removed startup function from api and added api.run function.