Several code enhancements

contains general performance improvements
Removing of pointless statements
Finalize some fields

will squash if reviewed. I figured it would be easier to review the single commits.
Cause I did not want to alter the logic for now.