begin extracting out server logic and testing, simplify and update readme