cleaned files. added examples. various bug fixes