Moved commonly used functions to libelektra
Fixed a clang compiler error #2