Example file and some bugs fixes