more texture fixes
code clean up,and work on config file