Removed unused code and changed some of the sql

queries now use dataAdapters