GH-5 Moved variables to designated scope