added several small things, some restructuring and put first example