Documentation examples & fixes, minor code changes