follow up on the last commit
variables cleanup and warnings fixup