replacing instance variables

Mini refactoring to replace some instance variables by methods. By that the constructor was no longer necessary.