Performance and layout improvements.

There was a loop around a search feature for characters in a string that
is needed in Java, but not in C++. Removed the for-loop, so that the
coding is only called once.
Merge branch 'feature/PerformanceImprovement' into develop