fixed or added customAttributes support

Fix: for customAttributes from language files.
clean up.

refactored
refactoring a bit
Merge pull request #15 from thoresuenert/master
Improve readability of tests
Improve formatting and code style