Library reimplemented. New code in rest_server library.