Moved variables out