viewserver compiles, fixed some minor bugs, SegmentID has been switched to int64 in viewservice package