Fixed bower dependency management, build, and optimisations