header clean code and use promises
couchshare: clean code