bit of a mess

moved header update to addElements
added vim markers
started to work on key generator
added log messages