Refactoring for Bower integration - fixes #111