Extra cleanup

* re-introduced some necessary include statements
* renamed misleading variable