Final pull request before completing of bachelor thesis.

This pull request contain currently mostly some fixes of previous implementation. Most notably, CL should be able to compile again with all supported GCC versions. (Starting with gcc-4.5.0.)

More commits will be added, so please, don't close the pull request yet. I will add the comment when all is ready for merging. Thanks! :)