fixing lazy code analysis warnings

Introduced during #363. The naming ones were a result of bad suggestions from me.