refactor and add bower support
refactor and add bower support