many bug fixes, many examples added