moved instance variables into header file

This was required to enable subclassing etc