Healthcheck n system manager

added spawn health check support. also extracted some functionality out of spawn to other classes.