restructuring of the code to work with deafult jquery mobile listviews