Refactors and merges

Please test if this works.
I added most used JavaScript dependencies to bower - maybe the workflow needs some refinements.