Initializing member variables correctly