loacl variables,dom structure, trim issues resolved