deep refactor and fix #5
add bower