Moving common functions to bad class, removing duplicated code
Merge branch 'dev/plosone-homepage' of github.com:PLOS/ambra into dev/plosone-homepage