Completely rewritten documentation