refactoring and introduction to bower in order to manage packages