restructured module
restructured deatabase updating
restructured module orgenization
cleaned code