Moved variable declarations and cleaned comments

Fixes #119