Refactored initialize with class method fix