FIX bugs and ADDED A chart window inside the main activity