Added documentation.
Improved validate API (REST).