refactor and remove bower dependency