moved documentation from PHP file into README; updated it.