Code tweaks

Closed username-removed-1243277 requested to merge (removed):code-tweaks into master

Nothing major, just a few cleanups here and there.