fixed more server bugs, reorganized
added finer-grained error messages to measurement version