integrating bootstrap, further js refactoring
further refactoring of js