Updates with working brain. Now need to invert to server model to respond to HTML requests and logical sorts with averages