Extended the documentation, fixed few errors