added TextMonitor for editText and some restructuring