added data list resync, and refactored some code