A lot of minor code-improvements.