bugfix: omelasticsearch did not compile on platforms without atomic instructions
remove no longer needed variable
remove compiler warning
remove unused variables